9 Commits

Author SHA1 Message Date
amery 0dd29272e9 build-sys: use local darvaza.org/core [DO-NOT-MERGE]
Signed-off-by: Alejandro Mery <amery@jpi.io>
2023-09-05 13:22:09 +00:00
amery 7fab1a799a build-sys: use local asciigoat.org/core [DO-NOT-MERGE]
Signed-off-by: Alejandro Mery <amery@jpi.io>
2023-09-05 13:22:09 +00:00
amery 16dfde1503 vscode: add Subname to the dictionary
Signed-off-by: Alejandro Mery <amery@jpi.io>
2023-09-05 13:22:09 +00:00
amery 41d7c6e04d vscode: add unescapes to the dictionary
Signed-off-by: Alejandro Mery <amery@jpi.io>
2023-09-05 13:22:09 +00:00
amery 48adaeb8a8 vscode: add asciigoat to the dictionary
Signed-off-by: Alejandro Mery <amery@jpi.io>
2023-09-05 13:22:09 +00:00
amery 99ca8d0b3b Merge branch 'pr-amery-basic' into next-amery 2023-09-05 13:22:01 +00:00
amery 986b6d1c6d Merge pull request 'parser: Unquoted(), AcceptQuotedString() and SplitCommaArray' (#9)
Reviewed-on: #9
2023-09-05 15:20:38 +02:00
amery d41cd781d9 parser: introduce SplitCommaArray to splits comma separated strings
removing whitespace and respecting quoted literals.

Signed-off-by: Alejandro Mery <amery@jpi.io>
2023-09-04 18:58:06 +00:00
amery 651fcb6215 parser: Unquoted(), AcceptQuotedString()
TODO: reduce quoted strings with escaped characters

Signed-off-by: Alejandro Mery <amery@jpi.io>
2023-09-04 18:58:06 +00:00
-7
View File
@@ -35,13 +35,6 @@ func NewErrIncompleteQuotedString(p *TextParser) *lexer.Error {
return newErrIncomplete(p, "incomplete quoted string")
}
// NewErrIncompleteEscaped returns a [lexer.Error]
// indicating the text being parsed wasn't correctly
// terminated
func NewErrIncompleteEscaped(p *TextParser) *lexer.Error {
return newErrIncomplete(p, "incomplete escaped string")
}
func newErrIncomplete(p *TextParser, hint string) *lexer.Error {
pos, s := p.Emit()
pos.Add(GetPositionalLength(s))