Handbook
Glossary
(literal) ( ast -- )
Vocabulary
fjsc
Inputs
ast
an
object
Outputs
None
Definition
IN:
fjsc
GENERIC:
(literal)
( ast -- )
Methods
USING:
accessors
fjsc
make
sequences
;
M:
ast-array
(literal)
"["
,
elements>>
[
","
,
]
[
(literal)
]
interleave
"]"
,
;
USING:
accessors
fjsc
sequences
;
M:
ast-expression
(literal)
values>>
[
(literal)
]
each
;
USING:
accessors
fjsc
make
sequences
;
M:
ast-hashtable
(literal)
"new Hashtable().fromAlist(["
,
elements>>
[
","
,
]
[
(literal)
]
interleave
"])"
,
;
USING:
accessors
fjsc
kernel
make
;
M:
ast-identifier
(literal)
dup
vocab>>
[
"factor.get_word(\""
,
dup
vocab>>
,
"\",\""
,
value>>
,
"\")"
,
]
[
"factor.find_word(\""
,
value>>
,
"\")"
,
]
if
;
USING:
accessors
fjsc
make
math.parser
;
M:
ast-number
(literal)
value>>
number>string
,
;
USING:
accessors
fjsc
make
;
M:
ast-quotation
(literal)
"factor.make_quotation(\"source\","
,
values>>
do-expressions
")"
,
;
USING:
accessors
fjsc
make
;
M:
ast-string
(literal)
"\""
,
value>>
,
"\""
,
;
USING:
accessors
fjsc
kernel
make
;
M:
ast-word
(literal)
dup
vocab>>
[
"factor.get_word(\""
,
dup
vocab>>
,
"\",\""
,
value>>
,
"\")"
,
]
[
"factor.find_word(\""
,
value>>
,
"\")"
,
]
if
;