mirror of
https://github.com/johnkerl/miller.git
synced 2026-01-23 10:15:36 +00:00
fix mlr repl -d
This commit is contained in:
parent
3fdcc75e45
commit
8510cbcff4
4 changed files with 50 additions and 1 deletions
|
|
@ -96,3 +96,14 @@ run_mlr repl --json $indir/flatten-input-2.json <<EOF
|
|||
:rw
|
||||
:rw
|
||||
EOF
|
||||
|
||||
# ----------------------------------------------------------------
|
||||
run_mlr repl -d <<EOF
|
||||
y=x+1
|
||||
EOF
|
||||
run_mlr repl -D <<EOF
|
||||
y=x+1
|
||||
EOF
|
||||
run_mlr repl -v <<EOF
|
||||
y=x+1
|
||||
EOF
|
||||
|
|
|
|||
|
|
@ -232,3 +232,22 @@ End of record stream
|
|||
}
|
||||
End of record stream
|
||||
|
||||
mlr repl -d
|
||||
(statement-block
|
||||
(=
|
||||
y
|
||||
(+ x 1)
|
||||
)
|
||||
)
|
||||
|
||||
mlr repl -D
|
||||
(statement-block (= y (+ x 1)))
|
||||
|
||||
mlr repl -v
|
||||
* statement block
|
||||
* assignment "="
|
||||
* local variable "y"
|
||||
* operator "+"
|
||||
* local variable "x"
|
||||
* int literal "1"
|
||||
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ func NewRepl(
|
|||
prompt1: getPrompt1(),
|
||||
prompt2: getPrompt2(),
|
||||
|
||||
astPrintMode: ASTPrintNone,
|
||||
astPrintMode: astPrintMode,
|
||||
cstRootNode: cst.NewEmptyRoot(&options.WriterOptions).WithRedefinableUDFUDS(),
|
||||
|
||||
options: options,
|
||||
|
|
|
|||
19
go/todo.txt
19
go/todo.txt
|
|
@ -3,6 +3,22 @@ TOP OF LIST:
|
|||
|
||||
! GC ./parser-experiments/two/src/github.com/goccmack/gocc/
|
||||
|
||||
* mrpl --prompt x
|
||||
* mrpl colorized help -- ?
|
||||
* mrpl some <<...>> ... or something ... for immediate multiline ...
|
||||
* is mrpl -d broken?
|
||||
* stack optimization:
|
||||
o AST pre-pass as in the C impl
|
||||
o Maybe SetAtScope -> passback of int?
|
||||
- caller
|
||||
> name="a" idx=-1
|
||||
> idx,err := Stack.Set(name, idx, value)
|
||||
- callee
|
||||
> if idx != -1 {
|
||||
idxvars[idx].Set
|
||||
}
|
||||
- maybe opaque idx type -- pair of frameset/frame indices
|
||||
|
||||
* regexes
|
||||
o finish stats1 -r
|
||||
o regex captures ...
|
||||
|
|
@ -17,6 +33,9 @@ w go get github.com/johnkerl/gocc@gocc2x.3, pending https://github.com/goccmack/
|
|||
|
||||
* json null
|
||||
* smart fmtnum
|
||||
- fmtnum
|
||||
- ofmt
|
||||
- no other callsites?!?!?!
|
||||
! smarter head-stop etc https://github.com/johnkerl/miller/issues/291
|
||||
|
||||
* port verb merge-fields
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue