Skip to content

Clojure support#8

Open
toninorair wants to merge 103 commits intoalexsaveliev:masterfrom
toninorair:clojure-support
Open

Clojure support#8
toninorair wants to merge 103 commits intoalexsaveliev:masterfrom
toninorair:clojure-support

Conversation

@toninorair
Copy link

Add minimal lexical support for Clojure language.
Supported constructions: let, def, defn, defmacro, letfn, loop, ns, in-ns...

- attributes in function parameters
- os/arch conditions will accept any identifier
- X in os(X) and arch(X) may be any identifier
- fixing foo.0
- added @Attribute(foo, bar, baz) support (comma-separated args)
- added @foo extension bar support (extension's attributes)
- fixed 'typealias' statement
- added mutating/nonmutating keyword support
- fixed unowned/unowned(unsafe)/unowned(safe) in properties
- fixed escaped characters in strings (may accept any number of hexadecimal chars)
- Replacing preprocessor directives in Swift with comments. We don't care about them anyway but they break parser when encountered inside class definition
- fixed #available statement
- fixed replacement of preprocessor directives with comments
- fixed ArrayIndexOfBounds exception
- dealing with "foo as? bar"
- bounds checking
- defs and refs extraction (WIP)
- working on foo.bar.baz().self().init()....
- extracting data from chains (foo.bar().baz...)
- switched to two-step processing
- trying to resolve variables with the same name in the different methods/functions (with the same name but different signature)
- corrected two-phase scan
- corrected function arguments scope
- handling of if/while/guard
- resolving implicit "self." in "foo()" statements inside class def
- type detection for (let/var foo = Bar()) statements
- javadoc
- dealing with code blocks in "else/do/repeat/..")
- fixed NPE
- operators as function arguments (sort(>))
- support of @Attribute(foo bar,baz qux) (both spaces and commas, e.g. "@available(iOS 9.0, OSX 10.11, *)"
- os and arch are valid identifiers
- workaround for "try?" statements
- support of "x = try y"
- fixed empty stack on " "foo".bar() "
- added support of "foo as bar"
- better handling of inner classes
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please provide link to specific commit hash instead of master

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

Successfully merging this pull request may close these issues.

2 participants