From 666f392bd23574f57689e9a9ea6d6a05a9bd2f97 Mon Sep 17 00:00:00 2001 From: Rowan Goemans Date: Mon, 30 Oct 2017 01:46:33 +0100 Subject: -- 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. --- src/CodeParser/CParser/Token.ts | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 src/CodeParser/CParser/Token.ts (limited to 'src/CodeParser/CParser/Token.ts') 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; + } +} -- cgit v1.2.3