google / starlark-go

Starlark in Go: the Starlark configuration language, implemented in Go

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

syntax: unexpected NEWLINE token is reported on following line

ortsaboy opened this issue · comments

Two cases ---

  1. Correct
╭─root at devenv in /handjob
╰─○ bat error.star
───────┬──────────────────────────────────────────────────────────────
       │ File: error.star
───────┼──────────────────────────────────────────────────────────────
   1   │ print("Hello World")
   2   │
   3   │ x, y = None
   4   │
   5   │ print("Aloha")
───────┴──────────────────────────────────────────────────────────────
╭─root at devenv in /handjob
╰─○ starlark -recursion -globalreassign error.star
Hello World
Traceback (most recent call last):
  error.star:3:6: in <toplevel>
Error: got NoneType in sequence assignment
  1. Incorrect --- should be line 3 as well, it got line 4
╭─root at devenv in /handjob
╰─○ bat error2.star
───────┬──────────────────────────────────────────────────────────────
       │ File: error2.star
───────┼──────────────────────────────────────────────────────────────
   1   │ print("Hello World")
   2   │
   3   │ x++
   4   │
   5   │ print("Aloha")
───────┴──────────────────────────────────────────────────────────────
╭─root at devenv in /handjob
╰─○ starlark -recursion -globalreassign error2.star
error2.star:4:1: got newline, want primary expression

Can you guys please fix it?