Skip to content

Commit 429d0e9

Browse files
committed
Fixed some errors in C pasm parsing
1 parent 5a5624f commit 429d0e9

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

Changelog.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
Version 7.3.1
2+
- Fixed some errors in C __pasm parsing
3+
14
Version 7.3.0
25
- Allow `__attribute__((packed))` on C structs
36
- Add `-Wbuiltin-fallback` for warning when builtin functions must call libraries

frontends/c/cgram.y

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3021,8 +3021,8 @@ pasm_operand:
30213021
{ $$ = NewAST(AST_EXPRLIST, NewAST(AST_IMMHOLDER, $2, NULL), NULL); }
30223022
| '#' '#' pasmexpr
30233023
{ $$ = NewAST(AST_EXPRLIST, NewAST(AST_BIGIMMHOLDER, $3, NULL), NULL); }
3024-
/* | pasmexpr '[' pasmexpr ']'
3025-
{ $$ = NewAST(AST_EXPRLIST, NewAST(AST_ARRAYREF, $1, $3), NULL); } */
3024+
| pasmexpr '[' pasmexpr ']'
3025+
{ $$ = NewAST(AST_EXPRLIST, NewAST(AST_ARRAYREF, $1, $3), NULL); }
30263026
;
30273027

30283028
pasm_operandlist:
@@ -3089,6 +3089,10 @@ pasmunary
30893089
{ $$ = AstOperator(K_NEGATE, NULL, $2); }
30903090
| '!' pasmunary
30913091
{ $$ = AstOperator(K_BIT_NOT, NULL, $2); }
3092+
| C_INC_OP pasmunary
3093+
{ $$ = AstOperator(K_INCREMENT, NULL, $2); }
3094+
| C_DEC_OP pasmunary
3095+
{ $$ = AstOperator(K_DECREMENT, NULL, $2); }
30923096
;
30933097

30943098
pasm_e1

0 commit comments

Comments
 (0)