Handbook
Glossary
build-locals ( code ast -- code )
Vocabulary
peg
.
ebnf
.
private
Inputs
code
an
object
ast
an
object
Outputs
code
an
object
Definition
IN:
peg.ebnf.private
GENERIC:
build-locals
( code ast -- code )
Methods
USING:
accessors
kernel
make
math.parser
peg.ebnf.private
sequences
;
M:
ebnf-sequence
build-locals
elements>>
filter-hidden
dup
length
1
=
[
first
build-locals
]
[
dup
[
ebnf-var?
]
none?
[
drop
]
[
[
"[let "
%
[
over
ebnf-var?
[
" "
%
#
" over nth :> "
%
name>>
%
]
[
2drop
]
if
]
each-index
" "
%
%
" nip ]"
%
]
""
make
]
if
]
if
;
USING:
accessors
make
peg.ebnf.private
;
M:
ebnf-var
build-locals
[
"[let dup :> "
%
name>>
%
" "
%
%
" nip ]"
%
]
""
make
;
USING:
accessors
peg.ebnf.private
;
M:
ebnf-whitespace
build-locals
group>>
build-locals
;
USING:
kernel
peg.ebnf.private
;
M:
object
build-locals
drop
;