qorf / quorum-language

The primary repository for the Quorum Programming Language
BSD 3-Clause "New" or "Revised" License
15 stars 6 forks source link

Unhelpful Error Message using dot instead of colon #2

Closed alexzrh closed 2 years ago

alexzrh commented 2 years ago

Source code:

use Libraries.Compute.Statistics.DataFrame

DataFrame frame

frame:Load("/Data/DarkSide.csv") // any data frame
output frame.ToText()  // using a dot gives a non-useful error message

When executing this in Quorum studio, I get a compiler error that doesn't point to where the actual syntax error exits. The error message:

"I noticed that the class /SourceCode/Main.quorum was specified as the starting point for this program, but it does not have an action named Main."

At line 1 Line 1 character 1 is red-underlined by the editor.

This is a single-file project, so it is in the Main.quorum file. 100% reproducible

andreas-stefik commented 2 years ago

This is now fixed and provides the following error message:

/Users/stefik/Repositories/quorum-language/Quorum/Library/Tests/Expressions/Fail/DataFrameError.quorum, Line 6, Column 12: Expected either a left paren (an action) or a colon (for an action call on an object) A call to an action is a name followed by ( (left paren), expressions, then ) (right paren). More info at https://quorumlanguage.com/tutorials/language/actions.html