mirror of
https://github.com/mikpe/pdp10-tools.git
synced 2026-04-29 05:06:09 +00:00
as: parse: handle parenthesized exprs
This commit is contained in:
@@ -630,6 +630,15 @@ expr(ScanState) ->
|
||||
|
||||
do_expr(ScanState, First) ->
|
||||
case First of
|
||||
{ok, {_Location1, ?T_LPAREN}} ->
|
||||
case expr(ScanState) of
|
||||
{ok, Expr} ->
|
||||
case scan:token(ScanState) of
|
||||
{ok, {_Location2, ?T_RPAREN}} -> {ok, Expr};
|
||||
ScanRes -> badtok("expected ')'", ScanRes)
|
||||
end;
|
||||
{error, _Reason} = Error -> Error
|
||||
end;
|
||||
{ok, {_Location1, ?T_MINUS}} ->
|
||||
case scan:token(ScanState) of
|
||||
{ok, {_Location2, {?T_UINTEGER, UInt}}} ->
|
||||
|
||||
Reference in New Issue
Block a user