An example of use: |
< basic: #hello > ^#ok |
To register the support for basic: primitive we evaluate: |
ScriptParser primitiveHandlers at: #basic: put: [:parser :context :type| | literal | literal := parser nextStringConstant: context. literal isNil ifTrue: [ literal := parser nextSymbolConstant: context. ]. literal isNil ifTrue: [ parser expected: 'String constant' ] ifFalse: [ PrimitiveNode doing: [:ctx :node | node exitWith: (literal evaluateIn: ctx) ] ] ] |