-
Notifications
You must be signed in to change notification settings - Fork 39
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
parseExpr の isStatic が true のとき、if式などは許容されませんが、ラベルがついていると許容されます。
aiscript/src/parser/syntaxes/expressions.ts
Lines 290 to 292 in 2f103d2
| case TokenKind.Sharp: { | |
| return parseExprWithLabel(s); | |
| } |
例
### meta_name #label: if true {
<: 1
}
#[attr_name #label: eval {
<: 2
}]
@_() {}
### {
key: #label: match x {
default => {
<: 3
Core:ai
}
}
}
:: ns {
#[attr_name #label: if true {
<: 4
}]
let _ = 1
}
https://aiscript-dev.github.io/playground.html (AiScript v1.2.0) で実行
出力
2
takejohnFineArchs and syuilo
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working