pigpigyyy / Yuescript

A Moonscript dialect compiles to Lua.
http://yuescript.org
MIT License
443 stars 38 forks source link

Error with syntax 'from module import member' #153

Closed GokuHiki closed 11 months ago

GokuHiki commented 11 months ago

I have the code that have the error:

from CS import
  System
  UnityEngine

from UnityEngine import
  Object
  GameObject
  Transform
  MonoBehaviour
  Vector3
  Quaternion

speed = 10  -- Error: syntax error

I Don't know what cause this error but I can bypass this error by changing speed = 10 -> local speed = 10.

Hope you can fix this error soon. Thanks for your hard work.

pigpigyyy commented 11 months ago

Missed the rule that the item list after from ... import should be in an indented block. Or the parser won't be able to tell when the item list ends. Should be fixed by the new commit.

GokuHiki commented 11 months ago

Confirm fixed!

Thanks you very much and regards!