-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathCParseErrorCommandNode.cpp
More file actions
39 lines (29 loc) · 922 Bytes
/
CParseErrorCommandNode.cpp
File metadata and controls
39 lines (29 loc) · 922 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/*
* CParseErrorCommandNode.cpp
* Forge
*
* Created by Uli Kusterer on 18.12.10.
* Copyright 2010 Uli Kusterer. All rights reserved.
*
*/
#include "CParseErrorCommandNode.h"
#include "CValueNode.h"
#include "CCodeBlock.h"
namespace Carlson
{
void CParseErrorCommandNode::GenerateCode( CCodeBlock* inCodeBlock )
{
inCodeBlock->GenerateParseErrorInstruction( mErrorMessage, mFileName, mLineNum, mOffset );
}
void CParseErrorCommandNode::DebugPrint( std::ostream& destStream, size_t indentLevel )
{
INDENT_PREPARE(indentLevel);
destStream << indentChars << "Command \"" << mSymbolName << "\"" << std::endl
<< indentChars << "{" << std::endl;
destStream << indentChars << "\t" << mFileName << ":" << mLineNum;
if( mOffset != SIZE_MAX )
destStream << ":" << mOffset;
destStream << ": " << mErrorMessage << std::endl;
destStream << indentChars << "}" << std::endl;
}
} // namespace Carlson