CodeWithSwastik/swas

Swas Online IDE Outdated

Makiyu-py opened this issue · 5 comments

I tried executing a basic application in the Online IDE, which gave an error:

hello = "world"
output hello

the error:

Illegal character '='
Swas says: hello hasn't been defined!
None
sly: Syntax error at line 1, token=STRING

Meanwhile I tried the v1.5 version of my own code:

hello => "world" &
output hello

which you've probably guessed, returned:

world

I also tried v1.8's new error handling in the Online IDE

"foo" % "bar"

which returned a different error than I expected .... (it's supposed to catch the TypeError)

Traceback (most recent call last):
File "/var/lang/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/var/lang/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/var/task/swas/__main__.py", line 13, in <module>
main()
File "/var/task/swas/__main__.py", line 10, in main
execute(fp)
File "/var/task/swas/executor.py", line 133, in execute
evaluate(tree)
File "/var/task/swas/executor.py", line 18, in evaluate
value = evaluate(tree[1])
File "/var/task/swas/executor.py", line 35, in evaluate
return evaluate(tree[1]) % evaluate(tree[2])
TypeError: not all arguments converted during string formatting

I tried executing a basic application in the Online IDE, which gave an error:

hello = "world"
output hello

the error:

Illegal character '='
Swas says: hello hasn't been defined!
None
sly: Syntax error at line 1, token=STRING

Meanwhile I tried the v1.5 version of my own code:

hello => "world" &
output hello

which you've probably guessed, returned:

world

I also tried v1.8's new error handling in the Online IDE

"foo" % "bar"

which returned a different error than I expected .... (it's supposed to catch the TypeError)

Traceback (most recent call last):
File "/var/lang/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/var/lang/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/var/task/swas/__main__.py", line 13, in <module>
main()
File "/var/task/swas/__main__.py", line 10, in main
execute(fp)
File "/var/task/swas/executor.py", line 133, in execute
evaluate(tree)
File "/var/task/swas/executor.py", line 18, in evaluate
value = evaluate(tree[1])
File "/var/task/swas/executor.py", line 35, in evaluate
return evaluate(tree[1]) % evaluate(tree[2])
TypeError: not all arguments converted during string formatting

Try:

hello => "world"
output hello

The only thing missing the Swas IDE is missing is:

  • Error handling
  • Input which I think should be fixed soon

I tried executing a basic application in the Online IDE, which gave an error:

hello = "world"
output hello

the error:

Illegal character '='
Swas says: hello hasn't been defined!
None
sly: Syntax error at line 1, token=STRING

Meanwhile I tried the v1.5 version of my own code:

hello => "world" &
output hello

which you've probably guessed, returned:

world

I also tried v1.8's new error handling in the Online IDE

"foo" % "bar"

which returned a different error than I expected .... (it's supposed to catch the TypeError)

Traceback (most recent call last):
File "/var/lang/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/var/lang/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/var/task/swas/__main__.py", line 13, in <module>
main()
File "/var/task/swas/__main__.py", line 10, in main
execute(fp)
File "/var/task/swas/executor.py", line 133, in execute
evaluate(tree)
File "/var/task/swas/executor.py", line 18, in evaluate
value = evaluate(tree[1])
File "/var/task/swas/executor.py", line 35, in evaluate
return evaluate(tree[1]) % evaluate(tree[2])
TypeError: not all arguments converted during string formatting

Try:

hello => "world"
output hello

The only thing missing the Swas IDE is missing is:

  • Error handling
  • Input which I think should be fixed soon

welp I tried what you gave me in the Online IDE but it returned an undefined error ....

Swas says: hello hasn't been defined!
sly: Syntax error at line 2, token=PRINT

I tried executing a basic application in the Online IDE, which gave an error:

hello = "world"
output hello

the error:

Illegal character '='
Swas says: hello hasn't been defined!
None
sly: Syntax error at line 1, token=STRING

Meanwhile I tried the v1.5 version of my own code:

hello => "world" &
output hello

which you've probably guessed, returned:

world

I also tried v1.8's new error handling in the Online IDE

"foo" % "bar"

which returned a different error than I expected .... (it's supposed to catch the TypeError)

Traceback (most recent call last):
File "/var/lang/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"__main__", mod_spec)
File "/var/lang/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/var/task/swas/__main__.py", line 13, in <module>
main()
File "/var/task/swas/__main__.py", line 10, in main
execute(fp)
File "/var/task/swas/executor.py", line 133, in execute
evaluate(tree)
File "/var/task/swas/executor.py", line 18, in evaluate
value = evaluate(tree[1])
File "/var/task/swas/executor.py", line 35, in evaluate
return evaluate(tree[1]) % evaluate(tree[2])
TypeError: not all arguments converted during string formatting

Try:

hello => "world"
output hello

The only thing missing the Swas IDE is missing is:

  • Error handling
  • Input which I think should be fixed soon

welp I tried what you gave me in the Online IDE but it returned an undefined error ....

Swas says: hello hasn't been defined!
sly: Syntax error at line 2, token=PRINT

nvm online IDE doesn't use version 2

hello => "hello" & 
output hello

This should have been fixed now