YarnSpinnerTool / ExperimentalYarnSpinnerEditor

An editor for Yarn Spinner written in electron / Typescript
https://yarnspinnertool.github.io/ExperimentalYarnSpinnerEditor/
Other
10 stars 1 forks source link

Tokeniser not identifying end of nodes correctly #103

Closed CullieM closed 3 years ago

CullieM commented 3 years ago
Screen Shot 2021-09-20 at 11 19 47 am

The node delimiter on line 8 is not being correctly identified, as evidenced by the yarn command on line 10, and the header tags on lines 13 and 14. The jump should appear as an error such as the jump in line 1, and the header tags should appear grey such as lines 4 and 5.

CullieM commented 3 years ago

/cib

create-issue-branch[bot] commented 3 years ago

Branch 103-Tokeniser-not-identifying-end-of-nodes-correctly created!

CullieM commented 3 years ago

Tokeniser now working correctly

Screen Shot 2021-09-20 at 11 29 25 am
CullieM commented 3 years ago

Issue was caused as symbols (which includes the equals sign '=') were being given higher precedent than the node delimiter. Due to this, "===" was being recognised as a sequence of equals signs rather than one node delimiter.

/[:!@%^&*()\\|<>?/~',."+=-]/ is the regex to identify symbols in dialogue, and /^===\n/ is the regex to identify the node delimiter. The string: === can still exist in dialogue, but if it is on a line on its own it is recognised as a node delimiter.