-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
create append #1
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -102,6 +102,15 @@ a_Stmt_List prepend_stmt_list( a_Stmt stmt, a_Stmt_List stmt_list, int pos ) | |
return a; | ||
} | ||
|
||
a_Stmt_List append_stmt_list( a_Stmt_List stmt_list, a_Stmt stmt, int pos ) | ||
{ | ||
a_Stmt_List a = new_stmt_list( stmt, pos ); | ||
a->next = stmt_list; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The function signature accepts the statment_list as the first argument and the statement as the second argument, as specified in the The body of this function was simply copied over from the previous function |
||
a->linepos = pos; | ||
return a; | ||
} | ||
|
||
|
||
a_Stmt new_stmt_from_expression( a_Exp exp, int pos ) | ||
{ | ||
a_Stmt a = (a_Stmt)checked_malloc( sizeof( struct a_Stmt_ ) ); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm getting a Bison error for this rule
bison --debug --verbose -dv -b chuck chuck.y chuck.y: conflicts: 73 shift/reduce chuck.y: expected 38 shift/reduce conflicts make: *** [chuck.tab.c] Error 1