Ohm-S icon indicating copy to clipboard operation
Ohm-S copied to clipboard

OhmSHRuleParser errors on incomplete Smalltalk method

Open stlutz opened this issue 3 years ago • 0 comments

On a fresh subclass of OhmGrammarSmalltalkProxy, when writing the class-side serializedGrammar method, the error Error: ByteString called #basicNew: with invalid argument -1 is thrown once the text editor contains the following:

serializedGrammar
^ '

The error is caused because the following code always assumes the opening single quote to be closed in the end: https://github.com/hpi-swa/Ohm-S/blob/98bf92f8e3baeacf18b33b5d1bef4c7ca3945e7f/packages/Ohm-Support.package/OhmSHRuleParser.class/instance/rangesIn.classOrMetaClass.workspace.environment.context..st#L14

stlutz avatar Mar 31 '21 00:03 stlutz