Add a human-readable error message for invalid char in step

This commit is contained in:
Alexandre G.-Raymond
2023-10-21 23:20:04 +02:00
parent cb8edd9b8f
commit 87f37e3d87
2 changed files with 95 additions and 87 deletions
File diff suppressed because one or more lines are too long
+2 -1
View File
@@ -103,7 +103,8 @@ quote = '"' / "'"
// ------------------ steps and cycles ---------------------------
// single step definition (e.g bd)
step_char = unicode_letter / [0-9~] / "-" / "#" / "." / "^" / "_"
step_char "a letter, a number, \"-\", \"#\", \".\", \"^\", \"_\"" =
unicode_letter / [0-9~] / "-" / "#" / "." / "^" / "_"
step = ws chars:step_char+ ws { return new AtomStub(chars.join("")) }
// define a sub cycle e.g. [1 2, 3 [4]]