-
Notifications
You must be signed in to change notification settings - Fork 1
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Import
statement parser
#362
Conversation
17f844a
to
e812c9d
Compare
) | ||
), | ||
endQuote = Quote(indexOf("""import "folder/file.ral>>"<<""")) | ||
) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what if we have no double quotes?
import folder/file.ral
how will it parse?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It will parse import
with an undefined/empty path. So during processing, nothing gets imported.
folder/file.ral
will get parsed as the next valid syntax i.e. infix expression, which in this case is division. This syntax is valid in the following case:
let folder = 1
let file = <<SomeContractOrObject instance>> // this object could contain `ral` either as a value or a function.
let division_result = folder / file.ral
The parser will always try to match the syntax to a the next valid grammar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
minor comment, otherwise LGTM
import
statements is required to complete scoping rules for integration.CodeProvider
execution (completion, goto definition etc) #104.