Skip to content

Commit

Permalink
Use string_as_id?
Browse files Browse the repository at this point in the history
  • Loading branch information
ydah committed Oct 1, 2024
1 parent 31281d8 commit 76182bd
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions parser.y
Original file line number Diff line number Diff line change
Expand Up @@ -250,8 +250,7 @@ rule
result = builder
}

alias: # empty
| string_as_id { result = val[0].s_value }
alias: string_as_id? { result = val[0].s_value if val[0] }

symbol_declarations: symbol+ { result = [{tag: nil, tokens: val[0]}] }
| TAG symbol+ { result = [{tag: val[0], tokens: val[1]}] }
Expand Down

0 comments on commit 76182bd

Please sign in to comment.