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

ES6 constructor with 'extends' module.class #154

Closed
valq7711 opened this issue Jul 3, 2017 · 0 comments
Closed

ES6 constructor with 'extends' module.class #154

valq7711 opened this issue Jul 3, 2017 · 0 comments

Comments

@valq7711
Copy link
Collaborator

valq7711 commented Jul 3, 2017

import  mod

class Foo(mod.Bar):
    def __init__(self):
        mod.Bar.__init__(self)
        ...

turns into:

class Foo extends mod.Bar {
        constructor () {
            var self = this;   // bug?
            super();
            var self = this;
            ...
         }

P.S. from mod import Bar - works fine

valq7711 added a commit to valq7711/RapydScript that referenced this issue Jul 6, 2018
valq7711 added a commit to valq7711/RapydScript that referenced this issue Jul 6, 2018
atsepkov added a commit that referenced this issue Jul 10, 2018
valq7711 added a commit to valq7711/RapydScript that referenced this issue Sep 25, 2019
* fix parser's readfile default option value

* fix ObjectLiteral.resolveType (Related to issue#140) 

bugs are fixed:
```
h = {a: None, b: 123}  # - causes an error because of the trying expected.indexOf("Function"), but expected==null
h = {a: None, b: None} # - is resolved to '{String:null}' - deadlock hash!  '{String:?}' is more suitable, isn't it?
h = {a: def(): ...; , b: def(x): ...;, c: 123} # - is resolved to '{String:Function}', because of the premature return without checking the remaining elements
```

* removing extra spaces

* fix issue atsepkov#154

* fix pollution by `chr`

* improve browser integration

* improve browser integration

* change `this` to `parent`

My bad!
`this` is undefined when "use strict;"

* Update rapydscript.pyj

* Add test of class extends mod.class

There is es6 bug

* Improved readability

* add some complexity;)

*  fix import

* small fixes (atsepkov#178)

* add `getOwnPropertyDescriptor(s)`

* fix js_error

add filename

* improve traceback on errors (atsepkov#179)

* Update test.pyj (atsepkov#181)

* fix  In-browser-compilation (atsepkov#174)

In-browser-compilation  the embedded baselib string is used instead of parsing a file, so `toplevel.baselib['...']>0` if only it is used in user code

* fix super (atsepkov#180)

* Add files via upload

* Add files via upload

* Add files via upload

* Add files via upload

* Add files via upload

* Add files via upload

* Add files via upload

* Create classes_es6.pyj

* Update test.pyj

* superCall -> superCall_expr

* Update README.md (atsepkov#183)

* Valq7711 patch fix yield (atsepkov#184)

* fix yield

now OK:
- `a = yield`
- `yield from [1,2,3]`
- `yield 1, 3, 4`  # turns into yield [1, 3, 4] as `return 1 ,3, 4`

* add init_mod()

add init_mod() to allow reinitialize all static object

* Update rapydscript.pyj

* Update rapydscript.pyj

* improve in-browser usage

* Update parser.pyj

* Update parser.pyj

* fix generator as class method (atsepkov#185)

* fix generator as class method

* Update output.pyj

* keep parentheses around yield

* keep parentheses around yield

* parentheses around yield

* parentheses around yield

* added support for sets in iterable logic

* implemented sets and fixed deep equality

* tweaked rounding error for travis

* dropping support for old versions of node

* further travis node version bump

* fixed math test by using epsilon comparisons

* added date support to equality operator

* Extend ImportError

Improve traceback for import errors

* Update parser.pyj

* Update imports.pyj

* Update imports.pyj

* Delete .DS_Store

* Update .gitignore

* fix mixin

* fix merge/mixin

* fix mixin/merge

add test

* check if `require` exists (atsepkov#196)

* fix `eq` (atsepkov#197)

* Valq7711 fix imports all (atsepkov#195)

see comment

* fix typo
valq7711 added a commit to valq7711/RapydScript that referenced this issue Sep 25, 2019
* fix parser's readfile default option value

* fix ObjectLiteral.resolveType (Related to issue#140) 

bugs are fixed:
```
h = {a: None, b: 123}  # - causes an error because of the trying expected.indexOf("Function"), but expected==null
h = {a: None, b: None} # - is resolved to '{String:null}' - deadlock hash!  '{String:?}' is more suitable, isn't it?
h = {a: def(): ...; , b: def(x): ...;, c: 123} # - is resolved to '{String:Function}', because of the premature return without checking the remaining elements
```

* removing extra spaces

* fix issue atsepkov#154

* fix pollution by `chr`

* improve browser integration

* improve browser integration

* change `this` to `parent`

My bad!
`this` is undefined when "use strict;"

* Update rapydscript.pyj

* Add test of class extends mod.class

There is es6 bug

* Improved readability

* add some complexity;)

*  fix import

* small fixes (atsepkov#178)

* add `getOwnPropertyDescriptor(s)`

* fix js_error

add filename

* improve traceback on errors (atsepkov#179)

* Update test.pyj (atsepkov#181)

* fix  In-browser-compilation (atsepkov#174)

In-browser-compilation  the embedded baselib string is used instead of parsing a file, so `toplevel.baselib['...']>0` if only it is used in user code

* fix super (atsepkov#180)

* Add files via upload

* Add files via upload

* Add files via upload

* Add files via upload

* Add files via upload

* Add files via upload

* Add files via upload

* Create classes_es6.pyj

* Update test.pyj

* superCall -> superCall_expr

* Update README.md (atsepkov#183)

* Valq7711 patch fix yield (atsepkov#184)

* fix yield

now OK:
- `a = yield`
- `yield from [1,2,3]`
- `yield 1, 3, 4`  # turns into yield [1, 3, 4] as `return 1 ,3, 4`

* add init_mod()

add init_mod() to allow reinitialize all static object

* Update rapydscript.pyj

* Update rapydscript.pyj

* improve in-browser usage

* Update parser.pyj

* Update parser.pyj

* fix generator as class method (atsepkov#185)

* fix generator as class method

* Update output.pyj

* keep parentheses around yield

* keep parentheses around yield

* parentheses around yield

* parentheses around yield

* added support for sets in iterable logic

* implemented sets and fixed deep equality

* tweaked rounding error for travis

* dropping support for old versions of node

* further travis node version bump

* fixed math test by using epsilon comparisons

* added date support to equality operator

* Extend ImportError

Improve traceback for import errors

* Update parser.pyj

* Update imports.pyj

* Update imports.pyj

* Delete .DS_Store

* Update .gitignore

* fix mixin

* fix merge/mixin

* fix mixin/merge

add test

* check if `require` exists (atsepkov#196)

* fix `eq` (atsepkov#197)

* Valq7711 fix imports all (atsepkov#195)

see comment

* fix typo
valq7711 added a commit to valq7711/RapydScript that referenced this issue Sep 25, 2019
* fix parser's readfile default option value

* fix ObjectLiteral.resolveType (Related to issue#140) 

bugs are fixed:
```
h = {a: None, b: 123}  # - causes an error because of the trying expected.indexOf("Function"), but expected==null
h = {a: None, b: None} # - is resolved to '{String:null}' - deadlock hash!  '{String:?}' is more suitable, isn't it?
h = {a: def(): ...; , b: def(x): ...;, c: 123} # - is resolved to '{String:Function}', because of the premature return without checking the remaining elements
```

* removing extra spaces

* fix issue atsepkov#154

* fix pollution by `chr`

* improve browser integration

* improve browser integration

* change `this` to `parent`

My bad!
`this` is undefined when "use strict;"

* Update rapydscript.pyj

* Add test of class extends mod.class

There is es6 bug

* Improved readability

* add some complexity;)

*  fix import

* small fixes (atsepkov#178)

* add `getOwnPropertyDescriptor(s)`

* fix js_error

add filename

* improve traceback on errors (atsepkov#179)

* Update test.pyj (atsepkov#181)

* fix  In-browser-compilation (atsepkov#174)

In-browser-compilation  the embedded baselib string is used instead of parsing a file, so `toplevel.baselib['...']>0` if only it is used in user code

* fix super (atsepkov#180)

* Add files via upload

* Add files via upload

* Add files via upload

* Add files via upload

* Add files via upload

* Add files via upload

* Add files via upload

* Create classes_es6.pyj

* Update test.pyj

* superCall -> superCall_expr

* Update README.md (atsepkov#183)

* Valq7711 patch fix yield (atsepkov#184)

* fix yield

now OK:
- `a = yield`
- `yield from [1,2,3]`
- `yield 1, 3, 4`  # turns into yield [1, 3, 4] as `return 1 ,3, 4`

* add init_mod()

add init_mod() to allow reinitialize all static object

* Update rapydscript.pyj

* Update rapydscript.pyj

* improve in-browser usage

* Update parser.pyj

* Update parser.pyj

* fix generator as class method (atsepkov#185)

* fix generator as class method

* Update output.pyj

* keep parentheses around yield

* keep parentheses around yield

* parentheses around yield

* parentheses around yield

* added support for sets in iterable logic

* implemented sets and fixed deep equality

* tweaked rounding error for travis

* dropping support for old versions of node

* further travis node version bump

* fixed math test by using epsilon comparisons

* added date support to equality operator

* Extend ImportError

Improve traceback for import errors

* Update parser.pyj

* Update imports.pyj

* Update imports.pyj

* Delete .DS_Store

* Update .gitignore

* fix mixin

* fix merge/mixin

* fix mixin/merge

add test

* check if `require` exists (atsepkov#196)

* fix `eq` (atsepkov#197)

* Valq7711 fix imports all (atsepkov#195)

see comment

* fix typo
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

1 participant