r-koubou/vscode-ksp

case statement

r-koubou opened this issue · 1 comments

When arithmetic operation is included, error processing is performed in grammar analysis
case文に四則演算が含まれているとエラーとみなしてしまう

[EXPECTED]

declare const $HOGE := 100
select( $i )
    case $HOGE + 1  {OK}
        messaga("+1" )       
    case $HOGE + 2  {OK}
        messaga("+2" )       
end select

[NOW]

declare const $HOGE := 100
select( $i )
    case $HOGE + 1  {Error}
        messaga("+1" )       
    case $HOGE + 2  {Error}
        messaga("+2" )       
end select

[TODO]
Constant folding
定数値の評価と畳込み

[SEE ALSO]
Parser Program Repository

Done