Browse Source

Add functions w/ pointer return types

pull/1/head
Max Brunsfeld 11 years ago
parent
commit
485141c5c0
3 changed files with 2122 additions and 2104 deletions
  1. +1
    -1
      grammar.coffee
  2. +2
    -2
      grammar_test/declarations.txt
  3. +2119
    -2101
      src/parser.c

+ 1
- 1
grammar.coffee View File

@ -69,7 +69,7 @@ module.exports = grammar
function_declaration: -> seq(
@type,
@identifier,
@type_expression,
"(", @formal_parameters, ")",
choice(";", @statement_block))

+ 2
- 2
grammar_test/declarations.txt View File

@ -141,7 +141,7 @@ int main(int argc, const char **argv);
Function definitions
============================================
void do_stuff(int arg1) {
void * do_stuff(int arg1) {
return 5;
}
@ -149,6 +149,6 @@ void do_stuff(int arg1) {
(function_declaration
(identifier)
(identifier)
(pointer_type (identifier))
(field (identifier) (identifier))
(statement_block (return_statement (number))))

+ 2119
- 2101
src/parser.c
File diff suppressed because it is too large
View File


Loading…
Cancel
Save