File: GrpASTNode.hpp

package info (click to toggle)
grcompiler 4.2-4
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 11,076 kB
  • ctags: 5,163
  • sloc: cpp: 45,565; sh: 4,451; ansic: 4,377; makefile: 185; xml: 175; perl: 127
file content (65 lines) | stat: -rw-r--r-- 1,376 bytes parent folder | download | duplicates (5)
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*--------------------------------------------------------------------*//*:Ignore this sentence.
Copyright (C) 1999, 2001 SIL International. All rights reserved.

Distributable under the terms of either the Common Public License or the
GNU Lesser General Public License, as specified in the LICENSING.txt file.

File: GrpASTNode.hpp
Responsibility: Sharon Correll
Last reviewed: Not yet.

Description:
    Customized tree node that contains line and file information.
-------------------------------------------------------------------------------*//*:End Ignore*/

#ifndef GRPASTNODE
#define GRPASTNODE

class GrpASTNode : public CommonASTNode
{
public:
	//	Additional instance variable:
	GrpLineAndFile m_lnf;

	//	And methods to handle it:
	GrpASTNode()
		: CommonASTNode()
	{
		// initialize instance variables
	}

	static ASTNode * factory()
	{
		return new GrpASTNode;
	}

	void initialize(RefToken t);

//	int getLine() { return m_lnf.Line(); }
//	void setLine(int n) { m_lnf.SetLine(n); }

	GrpLineAndFile LineAndFile()
	{
		return m_lnf;
	}

#if 0
	int debug(int level)
	{
		int nLine = m_lnf.PreProcessedLine();
		char rgch[20];
		itoa(nLine, rgch, 10);
		for (int l = 0; l < level; l++)
			OutputDebugString(" ");
		OutputDebugString(rgch);
		OutputDebugString("\n");
		return nLine;
	}
#endif

	//	Debugger:
	const char * debugString();
};


#endif // !GRPASTNODE