pikasTech / PikaPython

An ultra-lightweight Python interpreter that runs with only 4KB of RAM, zero dependencies. It is ready to use out of the box without any configuration required and easy to extend with C. Similar project: MicroPython, JerryScript.
http://pikapython.com/
MIT License
1.45k stars 132 forks source link

invalid syntax for having comments inside #323

Closed z64rankaisija closed 1 year ago

z64rankaisija commented 1 year ago

Ran into this issue while I was messing around. Not a huge issue at all but thought that might as well report it just in case.

Having comments inside info and dict will result in invalid syntax.

This does not work:

info = [
#   [ Age,   'Name',   'Place' ]
    [ 26,    'Jack',   'River' ],
    [ 32,    'Riven',  'England' ],
]

dict = {
#   'Name':  'Job'
    'Jack':  'Unemployed',
    'Riven': 'League of Legends'
}

This does work:

#   [ Age,   'Name',   'Place' ]
info = [
    [ 26,    'Jack',   'River' ],
    [ 32,    'Riven',  'England' ],
]

#   'Name':  'Job'
dict = {
    'Jack':  'Unemployed',
    'Riven': 'League of Legends'
}
pikasTech commented 1 year ago

to be fixed soon

pikasTech commented 1 year ago

fixed https://github.com/pikasTech/PikaPython/commit/5da6b727e90080de0ab370a5375a073019d7ec54