Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
132 commits
Select commit Hold shift + click to select a range
5879b94
parser wip
marihachi Sep 17, 2023
4b291fa
npm scripts
marihachi Sep 17, 2023
c33c4fb
lint
marihachi Sep 17, 2023
c2d395d
token stream wip
marihachi Sep 18, 2023
23210e1
token stream wip
marihachi Sep 18, 2023
d75ac4f
add tokens
marihachi Sep 18, 2023
bd27468
token stream wip
marihachi Sep 18, 2023
27864a1
lint
marihachi Sep 18, 2023
880d5f2
token stream wip
marihachi Sep 18, 2023
c70ed01
add test
marihachi Sep 18, 2023
fe61723
test
marihachi Sep 18, 2023
4c3cad7
test
marihachi Sep 18, 2023
b0e3986
token stream wip
marihachi Sep 18, 2023
14c7694
parse comment
marihachi Sep 18, 2023
7848a8c
refactor
marihachi Sep 18, 2023
3996ffc
parser wip
marihachi Sep 18, 2023
97bf5ce
lint
marihachi Sep 18, 2023
6ef6967
enhance token stream, move parser rules
marihachi Sep 18, 2023
9a8aee3
refactor
marihachi Sep 18, 2023
31f1809
debug
marihachi Sep 18, 2023
3ac6f60
parser wip
marihachi Sep 18, 2023
c807ce4
parser wip
marihachi Sep 18, 2023
42bca5f
parser wip
marihachi Sep 18, 2023
3da0ada
parser: variable of number type
marihachi Sep 18, 2023
d9f682a
refactor
marihachi Sep 18, 2023
2206dc0
wip
marihachi Sep 18, 2023
e641837
parser wip
marihachi Sep 19, 2023
5c2cc25
doc
marihachi Sep 19, 2023
b712b80
parser wip
marihachi Sep 19, 2023
f293045
Merge branch 'master' into new-parser
marihachi Sep 19, 2023
6d3d0ca
refactor
marihachi Sep 20, 2023
98aa836
parser wip
marihachi Sep 20, 2023
5545b63
debug
marihachi Sep 21, 2023
8eb63f0
parser wip
marihachi Sep 21, 2023
c2da110
clean
marihachi Sep 21, 2023
f222e8e
parser wip: statement
marihachi Sep 21, 2023
e7ec8ad
parser wip: array
marihachi Sep 22, 2023
69f17e4
parser wip: tmpl, string literal
marihachi Sep 23, 2023
b70c35c
lint
marihachi Sep 23, 2023
706c99f
refactor
marihachi Sep 24, 2023
b5ac28c
refactor
marihachi Sep 24, 2023
d13c3da
fix test
marihachi Sep 24, 2023
169d951
debug
marihachi Sep 24, 2023
b405019
lint
marihachi Sep 24, 2023
d9b2aeb
refactor
marihachi Sep 24, 2023
e0f9035
refactor
marihachi Sep 24, 2023
442ff8d
parser wip: each
marihachi Sep 24, 2023
771b54a
parser wip: for
marihachi Sep 24, 2023
9f39bc0
assign, fn expr, exprs
marihachi Sep 24, 2023
2a3be46
split source files
marihachi Sep 24, 2023
d4d309c
Merge branch 'master' into new-parser
marihachi Sep 24, 2023
350f6b1
lint
marihachi Sep 24, 2023
3179ff2
pratt parsing
marihachi Sep 24, 2023
9af45e1
lint
marihachi Sep 24, 2023
5b51934
ops
marihachi Sep 24, 2023
72ce139
ops, spacing info for tokens
marihachi Sep 24, 2023
69cf976
suger of op nodes
marihachi Sep 24, 2023
f4ba0c2
fix variable name
marihachi Sep 24, 2023
f9a11fb
single quoted string literal
marihachi Sep 24, 2023
9043a94
ops
marihachi Sep 24, 2023
326e12f
function wip
marihachi Sep 24, 2023
0cf0bec
enhance CharStream
marihachi Sep 26, 2023
ad6828d
Merge branch 'master' into new-parser
marihachi Sep 26, 2023
b1de0e8
wip
marihachi Sep 26, 2023
a07c300
doc
marihachi Sep 26, 2023
a06a532
lookahead scan
marihachi Sep 28, 2023
7a51bb2
lint
marihachi Sep 28, 2023
07570aa
lookahead
marihachi Sep 28, 2023
1ec51bd
parser wip: fn
marihachi Sep 28, 2023
43dd075
refactor
marihachi Sep 28, 2023
a6e4cde
fix bug
marihachi Sep 29, 2023
6fdac7d
parser: function call
marihachi Sep 29, 2023
67b7cc2
parser: function params
marihachi Sep 29, 2023
622a647
fix bug
marihachi Sep 29, 2023
5ad2843
refactor
marihachi Sep 29, 2023
d221042
refactor
marihachi Sep 29, 2023
dd52a04
parser: fix sign
marihachi Sep 29, 2023
ab37396
lint
marihachi Sep 29, 2023
211d74d
parser: mod op
marihachi Sep 29, 2023
f085de1
remove infix-to-fncall plugin
marihachi Sep 29, 2023
b209cbb
parser: attr wip
marihachi Sep 29, 2023
a49e098
remove set-attribute plugin
marihachi Sep 29, 2023
66acc41
remove transform-chain plugin
marihachi Sep 29, 2023
9d4d193
refactor
marihachi Sep 30, 2023
09b0abd
fix out
marihachi Sep 30, 2023
9b04244
parser: separators
marihachi Sep 30, 2023
3c812c8
update test
marihachi Sep 30, 2023
7141ff0
lint
marihachi Sep 30, 2023
b9d733e
parser: match
marihachi Sep 30, 2023
54c4892
clean
marihachi Sep 30, 2023
526df9e
Merge branch 'master' into new-parser
marihachi Oct 1, 2023
9986d08
update CST nodes
marihachi Oct 1, 2023
64d5f34
update node
marihachi Oct 1, 2023
97de71d
debug
marihachi Oct 1, 2023
dd42375
parser wip
marihachi Oct 1, 2023
3160e91
fix multi statement
marihachi Oct 2, 2023
05de92c
backslash support
marihachi Oct 2, 2023
6d47339
lint
marihachi Oct 2, 2023
54a16e8
newline token
marihachi Oct 2, 2023
0a45d7f
test
marihachi Oct 5, 2023
9718474
debug
marihachi Oct 5, 2023
9ba1655
parser: newline
marihachi Oct 5, 2023
0246f7f
parser: float
marihachi Oct 5, 2023
61440a1
Merge branch 'master' into new-parser
marihachi Oct 7, 2023
d77a2e8
escape chars for template
marihachi Oct 7, 2023
7215bdc
escape newlines for pratt parser
marihachi Oct 7, 2023
1d41979
update escape for template
marihachi Oct 7, 2023
81b60fe
fix postfix ops
marihachi Oct 7, 2023
6e517b3
modify test: disallow line break in pratt parser
marihachi Oct 7, 2023
2437640
escape for string literal
marihachi Oct 7, 2023
9cd41a2
clean
marihachi Oct 7, 2023
1e693be
remove stream init, node pos wip
marihachi Oct 7, 2023
755a333
code location
marihachi Oct 7, 2023
0bd0c00
fix newline
marihachi Oct 7, 2023
3b59ec3
refactor
marihachi Oct 7, 2023
79b0cb2
test
marihachi Oct 7, 2023
3278f61
meta
marihachi Oct 7, 2023
5ed881e
lint
marihachi Oct 7, 2023
e39ebc0
var def, attr, if
marihachi Oct 7, 2023
3279175
lint
marihachi Oct 7, 2023
9735ff3
if
marihachi Oct 7, 2023
3f9c985
types
marihachi Oct 8, 2023
4749274
remove peg parser
marihachi Oct 8, 2023
ec77c61
remove peg parser
marihachi Oct 8, 2023
907abba
remove CST nodes
marihachi Oct 8, 2023
9fd5c56
move node utility
marihachi Oct 8, 2023
ab3b201
api
marihachi Oct 8, 2023
36a37f4
update CHANGELOG
marihachi Oct 8, 2023
3c07dd4
add jsdoc
marihachi Oct 8, 2023
12f0af7
disallow spaces in a reference
marihachi Oct 9, 2023
2431fda
Merge branch 'master' into new-parser
marihachi Oct 13, 2023
62a0a27
test: match syntax
marihachi Oct 14, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,13 @@
バージョン0.16.0に記録漏れがありました。
>- 関数`Str:from_codepoint` `Str#codepoint_at`を追加

# Next
- 新しいAiScriptパーサーが実装されました。
- スペースの厳密さが緩和されました。
- 文字列リテラルやテンプレートで、`\`とそれに続く1文字は全てエスケープシーケンスとして扱われるようになりました。
## Breaking changes
- 改行トークンを導入。改行の扱いが今までより厳密になりました。改行することができると決められた部分以外では文法エラーになります。

# 0.17.0
- `package.json`を修正

Expand Down
9 changes: 9 additions & 0 deletions docs/parser/scanner.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Scanner 設計資料
作成者: marihachi

## 現在のトークンと先読みされたトークン
_tokensの0番には現在のトークンが保持される。また、トークンが先読みされた場合は1番以降にそれらのトークンが保持されていくことになる。
例えば、次のトークンを1つ先読みした場合は0番に現在のトークンが入り1番に先読みされたトークンが入る。

nextメソッドで現在位置が移動すると、それまで0番にあったトークン(現在のトークン)は配列から削除され、1番にあった要素は現在のトークンとなる。
配列から全てのトークンが無くなった場合はトークンの読み取りが実行される。
Loading