HS: sourceInfo 4/4 + arrayLiteral 8/8 (+5 tests)
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 17s
Some checks failed
Test, Build, and Deploy / test-build-deploy (push) Failing after 17s
- tokenizer hs-emit!: add :end (max pos, start+len(val)) and :line fields to tokens - parser hs-parse-ast: wrap fn body in do so set! hs-span-mode executes - runtime hs-make-object: remove _order key (V8 native insertion order sufficient)
This commit is contained in:
@@ -460,7 +460,13 @@
|
||||
hs-emit!
|
||||
(fn
|
||||
(type value start)
|
||||
(append! tokens (hs-make-token type value start))))
|
||||
(let
|
||||
((tok (hs-make-token type value start))
|
||||
(end-pos (max pos (+ start (if (nil? value) 0 (len (str value)))))))
|
||||
(do
|
||||
(dict-set! tok "end" end-pos)
|
||||
(dict-set! tok "line" (len (split (slice src 0 start) "\n")))
|
||||
(append! tokens tok)))))
|
||||
(define
|
||||
scan!
|
||||
(fn
|
||||
|
||||
Reference in New Issue
Block a user