If someone inserts a space after the function name and before the inputs, there is a confusing error message:
Phrase ("hello")
This is interpreted as the structure Phrase followed by a block with the text hello.
Similarly:
Phrase("hello" place: Place (1m 2m))
This is interpreted as the input place being given the structure Place and then the next input being the block (1m 2m).
That pesky space can cause all kinds of confusion, but the space does have meaning.
What's the design idea?
Evaluate should check for a name token followed by Block not separated by a newline where there is a type error on both the name and the block and then generate a conflict indicating the likely error. The conflict should generate a resolution that proposes to remove the space to correct the error.
What's the problem?
If someone inserts a space after the function name and before the inputs, there is a confusing error message:
Phrase ("hello")
This is interpreted as the structure
Phrase
followed by a block with the text hello.Similarly:
Phrase("hello" place: Place (1m 2m))
This is interpreted as the input
place
being given the structurePlace
and then the next input being the block(1m 2m)
.That pesky space can cause all kinds of confusion, but the space does have meaning.
What's the design idea?
Evaluate should check for a name token followed by
Block
not separated by a newline where there is a type error on both the name and the block and then generate a conflict indicating the likely error. The conflict should generate a resolution that proposes to remove the space to correct the error.