Odin icon indicating copy to clipboard operation
Odin copied to clipboard

Syntax errors when declaring a multi-line procedure

Open vicvi1997 opened this issue 1 year ago • 0 comments

Context

uname -a Linux thinkpad 6.5.0-44-generic #44~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Tue Jun 18 14:36:16 UTC 2 x86_64 x86_64 x86_64 GNU/Linux odin report Odin: dev-2024-07:65c91b7dd OS: Ubuntu 22.04.4 LTS, Linux 6.5.0-44-generic CPU: 12th Gen Intel(R) Core(TM) i5-1235U RAM: 15660 MiB Backend: LLVM 14.0.0

Please read https://github.com/DanielGavin/ols/issues/447 for context.

Expected Behavior

I was expecting code like: odin1 to not throw syntax errors like:

  • expected ')' after parameter list, got 'newline'
  • expected a statement, got )
  • expected a statement, got }

Current Behavior

The code above compiles and runs OK. I would like to know if the code is in fact valid Odin ( probably an issue in the core:odin/parser package ) or not ( probably an issue with the compiler for successfully compiling invalid code ).

Personally, when the list of parameters and return values get large I think it is nice for readability to be able to split each element in a separate line. I would expect the code to be valid Odin.

Additional Information

Text Editor: VSCode OLS extension version: v0.1.30

vicvi1997 avatar Jul 24 '24 10:07 vicvi1997