Skip to content

fix parser warnings for semicolons in function arguments #2676

@bob-carpenter

Description

@bob-carpenter

Summary:

The parser is producing a confusing warning for the following ill-formed Stan program:

transformed data {
  real x = atan2(2 ; 3);
}

See the Discourse topic for more examples

Current Output:

SYNTAX ERROR, MESSAGE(S) FROM PARSER:
 error in '/Users/carp/temp2/confusing.stan' at line 2, column 17
  -------------------------------------------------
     1: transformed data {
     2:   real x = atan2(2 ; 3);
                        ^
     3: }
  -------------------------------------------------

PARSER EXPECTED: "("

Expected Output:

Something like "expected , or )" pointing before the semicolon.

Current Version:

v2.18.0

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions