summaryrefslogtreecommitdiffstats
path: root/src/CodeParser/CParser/CParser.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/CodeParser/CParser/CParser.ts')
-rw-r--r--src/CodeParser/CParser/CParser.ts5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/CodeParser/CParser/CParser.ts b/src/CodeParser/CParser/CParser.ts
index f87dbdd..6f598ad 100644
--- a/src/CodeParser/CParser/CParser.ts
+++ b/src/CodeParser/CParser/CParser.ts
@@ -81,6 +81,10 @@ export default class CParser implements ICodeParser {
Pointer: (x: string): string => (x.match("^\\*") || [])[0],
Reference: (x: string): string => (x.match("^&") || [])[0],
Symbol: (x: string): string => {
+ // Handle access specifiers since they aren't really symbols.
+ if (x.startsWith("public:") || x.startsWith("protected:") || x.startsWith("private:")) {
+ return undefined;
+ }
// Handle operator and decltype special cases.
if (x.startsWith("operator") === true) {
const startBrace: number = x.indexOf("(");
@@ -223,6 +227,7 @@ export default class CParser implements ICodeParser {
const tokens: Token[] = this.Tokenize(line)
.filter((t) => t.Type !== TokenType.CommentBlock)
.filter((t) => t.Type !== TokenType.CommentLine);
+
// Create hierarchical tree based on the parenthesis.
const tree: ParseTree = ParseTree.CreateTree(tokens).Compact();