tact icon indicating copy to clipboard operation
tact copied to clipboard

Block statements are missing from ASTs

Open anton-trunov opened this issue 8 months ago • 2 comments

Block statements are a part of the Tact grammar but those are not processed when converting Ohm.js's CSTs to ASTs.

Hence this code snippet

fun foo() {
    {
        // I'm a block statement
        let x: Int = 42;
    }
}

results in the following error message:

Missing semantic action for 'StatementBlock' in operation 'resolve_statement'. 
Action stack (most recent call last): 
  resolve_program > Program 
  resolve_program_item > default action for 'ProgramItem' 
  resolve_program_item > StaticFunction 
  resolve_declaration > default action for 'Function' 
  resolve_declaration > Function_withVoid 
  resolve_statement > default action for 'Statement' 
  resolve_statement > StatementBlock 

anton-trunov avatar May 25 '24 10:05 anton-trunov