Skip to content

Commit

Permalink
refactor scopes and add top-level and block scope (related!)
Browse files Browse the repository at this point in the history
- annotate delimiter pairing logic
- generate a var statement for the given node
- [FIX!] update scope to use positions and call .type() recursively!

this fixes the following code:
```coffee
import x from "./lib/coffeescript/index.js"
do ->
  x = 3
  x
```
- rename "scope" to FunctionScope
- break out a separate TopLevelScope so we can look at modules more clearly
- add lots of TODOs and fix namedMethod?()
- remove extraneous 9e9 limit from .splice call
- add quite a lot of notes to compileWithDeclarations
- add block scopes!!!!
- imports and exports are so much better supported now!!!
- assigning to an imported symbol is an error
  • Loading branch information
cosmicexplorer committed Nov 24, 2024
1 parent 817c39a commit defabc8
Show file tree
Hide file tree
Showing 16 changed files with 1,893 additions and 848 deletions.
30 changes: 9 additions & 21 deletions lib/coffeescript/coffeescript.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

27 changes: 27 additions & 0 deletions lib/coffeescript/helpers.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 8 additions & 3 deletions lib/coffeescript/lexer.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit defabc8

Please sign in to comment.