Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ERROR: test.lite:2:1. Module: found ' '(EOF) but 'NEWLINE' required #10

Open
mationai opened this issue Oct 22, 2014 · 2 comments
Open

Comments

@mationai
Copy link

I have a simple test.lite file, created simply via vi:

print "hi"

lite -run test.lite gave me:

ERROR: test.lite:3:1. Module: found ' '(EOF) but 'NEWLINE' required

Again, the file is created simply with vi, so file encoding is the standard unix (on OSX).
Also, why does it say line 3? The file only as a single line, w/o any CRs.

running the latest v0.8.8 Build

@luciotato
Copy link
Owner

Try indenting 4 spaces the line. code is always indented at least 4 spaces. (Note: ''' won't do).

$ echo "    print 'hi'">test.lite
$ lite -v 0 -run test.lite
hi

$ echo "print 'hi'">test.lite
$ lite -v 0 -run test.lite
 ERROR: test.lite:3:1. Module: found ' '(EOF) but 'NEWLINE' required 
 test.lite:3:1. Module: found ' '(EOF) but 'NEWLINE' required 

@mationai
Copy link
Author

Would separating the requirement to have 4 indented spaces to only .md files be worth while? I like liteScript for its smart static type system and other goodies, not for the .md part, so forcing 4 spaces everywhere is a bad idea for my use case (and I imagine for many or perhaps most people too). I tried to remove that requirement from Grammar and Parser, but blockIndent <= parentIndent still failed in ASTBase. So currently I'm adding a step in my gulp process to insert indentations. If I didn't have to do that, it would be great.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants