When using the internal parser with parse, strings in the target are not distinguished from atoms:
Code: Select all
(parse [text](println "Hello world")[/text])
...results in:
Code: Select all
'("(" "println" "Hello world" ")")
The only way to check them would be contextually, which would be more difficult that is reasonable in newLISP (i.e. ml-style inference) or testing against the current symbol set. The latter has the disadvantage that if the string is equal to the string value of an existing symbol, it will not be identified as a string. It will also not be able to find other contexts without the application previously tracking context creation.
Can parse be modified to use newLISP's parsing rules but to identify strings correctly? Or perhaps identify ", {, }, [text], [/text] all as tokens?