summaryrefslogtreecommitdiffstats
path: root/src/CodeParser/CParser/Token.ts
diff options
context:
space:
mode:
authorRowan Goemans <RB.Goemans@student.han.nl>2017-10-30 01:46:33 +0100
committerRowan Goemans <RB.Goemans@student.han.nl>2017-10-30 01:46:33 +0100
commit5ae892f8267c76473330e5da3d2eafdb4f6447ef (patch)
treedcad101896db2e2e0867168bd233c97711920a0c /src/CodeParser/CParser/Token.ts
parentd2bda50f26bffd6a56574188704d9df50fecabf8 (diff)
downloaddoxdocgen-5ae892f8267c76473330e5da3d2eafdb4f6447ef.tar.gz
-- Completely rewritten parser to support all known(to me) C++ constructs, this includes:
- Function pointers as parameters and as returns. - Template support. - Trailing return type. - Variadic templates. - Variadic parametes, C style and template style. - Correct parsing of template types with more then 1 template parameter.
Diffstat (limited to 'src/CodeParser/CParser/Token.ts')
-rw-r--r--src/CodeParser/CParser/Token.ts24
1 files changed, 24 insertions, 0 deletions
diff --git a/src/CodeParser/CParser/Token.ts b/src/CodeParser/CParser/Token.ts
new file mode 100644
index 0000000..379fd46
--- /dev/null
+++ b/src/CodeParser/CParser/Token.ts
@@ -0,0 +1,24 @@
+export enum TokenType {
+ Symbol,
+ Pointer,
+ Reference,
+ ArraySubscript,
+ OpenParenthesis,
+ CloseParenthesis,
+ CurlyBlock,
+ Assignment,
+ Comma,
+ Arrow,
+ Ellipsis,
+ Attribute,
+}
+
+export class Token {
+ public Type: TokenType;
+ public Value: string;
+
+ constructor(type: TokenType, value: string) {
+ this.Type = type;
+ this.Value = value;
+ }
+}