Skip to content

Commit

Permalink
disallow Foo.bar and Foo as variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
berekuk committed Jan 19, 2024
1 parent 6dfbfd6 commit 9513f3f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/squiggle-lang/src/ast/peggyParser.peggy
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,11 @@ statement
/ defunStatement

letStatement
= exported:("export" __nl)? variable:variable _ assignmentOp _nl value:zeroOMoreArgumentsBlockOrExpression
= exported:("export" __nl)? variable:dollarIdentifier _ assignmentOp _nl value:zeroOMoreArgumentsBlockOrExpression
{ return h.nodeLetStatement(variable, value, Boolean(exported), location()); }

defunStatement
= exported:("export" __nl)? variable:variable '(' _nl args:functionParameters _nl ')' _ assignmentOp _nl body:innerBlockOrExpression
= exported:("export" __nl)? variable:dollarIdentifier '(' _nl args:functionParameters _nl ')' _ assignmentOp _nl body:innerBlockOrExpression
{
const value = h.nodeLambda(args, body, location(), variable);
return h.nodeDefunStatement(variable, value, Boolean(exported), location());
Expand Down

0 comments on commit 9513f3f

Please sign in to comment.