-- A few example names: [snip] "." --> Name Relative ["."]
Under the documentation, "." should be an operator. However, the source code explicitly states "." is a relative name rather than an operator.
Which is correct? I'm writing a tree sitter grammar for IDEs that use tree sitter grammars for parsing/syntax highlighting/code suggestions.
(Side note, is there a formal grammar specification somewhere? Right now I'm reduced to reading the Haskell source to understand the documentation I've found better and trying to figure things out, but it's very slow going.)
@kylegoetz Name.hs has changed a bunch now, could you take another look and see if it impacts or changes your question, feel free to grab me on Discord too if that helps.
In the documentation, the rules for deciding whether "." is part of a name (dividing name segments) versus an operator say (https://www.unison-lang.org/learn/language-reference/identifiers/):
However, in the source code itself (https://github.com/unisonweb/unison/blob/trunk/unison-core/src/Unison/Name.hs)
Under the documentation, "." should be an operator. However, the source code explicitly states "." is a relative name rather than an operator.
Which is correct? I'm writing a tree sitter grammar for IDEs that use tree sitter grammars for parsing/syntax highlighting/code suggestions.
(Side note, is there a formal grammar specification somewhere? Right now I'm reduced to reading the Haskell source to understand the documentation I've found better and trying to figure things out, but it's very slow going.)