Skip to content

Commit

Permalink
syntax support for pointer type function
Browse files Browse the repository at this point in the history
  • Loading branch information
felixhao28 committed Apr 6, 2016
1 parent 8ae526c commit db8c6f1
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 19 deletions.
2 changes: 1 addition & 1 deletion demo/debug.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ argv = require("minimist") process.argv.slice(2)
config = {}

if process.argv.length > 2
testName = argv._[0];
testName = argv._[0]
if argv.d or argv.debug
config.debug = true

Expand Down
44 changes: 27 additions & 17 deletions lib/ast.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 2 additions & 1 deletion pegjs/ast.pegjs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,8 @@ TypedefDeclaration
;

FunctionDefinition
= a:DeclarationSpecifiers b:FunctionDirectDeclarator c:(SEMI {return null;} / CompoundStatement) {
= a:DeclarationSpecifiers b_pointer:STAR? b:FunctionDirectDeclarator c:(SEMI {return null;} / CompoundStatement) {
b.Pointer = b_pointer;
return addPositionInfo({type:'FunctionDefinition', DeclarationSpecifiers:a, Declarator:b, CompoundStatement:c});
}
;
Expand Down

0 comments on commit db8c6f1

Please sign in to comment.