links icon indicating copy to clipboard operation
links copied to clipboard

space required when using < before a variable

Open vcgalpin opened this issue 3 years ago • 2 comments
trafficstars

links> var x=5; x = 5 : Int links> 1<x; ***: Parse error: :1

1<x; ^ links> 1< x; true : Bool

vcgalpin avatar Nov 29 '21 15:11 vcgalpin

I think this is intended per the lexical syntax. <x is parsed as the opening of a XML tag.

dhil avatar Nov 29 '21 15:11 dhil

Yes, this seems inevitable since XML can be freely used as an expression, without some kind of disambiguating quasiquote introducer like xml {<x>foo</x>} (that might make sense to have anyway but would be a big breaking change)

jamescheney avatar Nov 29 '21 15:11 jamescheney