cubing / alg.cubing.net

▶️ Multi-purpose puzzle viewer – the old generation of alg/reconstruction viewing and sharing. Superseded by Twizzle.
https://alg.cubing.net
Other
185 stars 32 forks source link

Display feedback upon failed alg parse. #22

Open lgarron opened 10 years ago

lgarron commented 10 years ago

The console error is nearly descriptive enough to show directly to the user, but I need to figure out where to put it (probably an error box under the textarea, with highlighting of the bad move).

Error: Parse error on line 1:
R U '
----^
Expecting 'EOF', 'NUMBER', 'BASE_W', 'BASE_LOWERCASE', 'BASE_UPPERCASE', 'BASE_ROTATION', 'BASE_SLICE', 'PAUSE', 'WHITESPACE', 'OPEN_BRACKET', 'COMMA', 'CLOSE_BRACKET', 'COLON', 'OPEN_PARENTHESIS', 'CLOSE_PARENTHESIS', 'NEWLINE', got 'PRIME'

Note that the init/alg textareas are already highlighted when there's a mistake (since e59418be5be02ff145dd7c317f599e0123ba55bb).