Commit Graph

26 Commits

Author SHA1 Message Date
Michał Wawrzyniec Urbańczyk
2f015c70de
HasSpan and HasRepr implementation for AST (#416)
Provides implementation of `HasSpan` and (newly introduced) `HasRepr` for all relevant Ast types.
Implements #379.

Wherever feasible, I tried to reduce boilerplate with macros. Certainly more can be done in that regard but that'd require spending more time on this task than we allocated.
2020-01-08 00:51:59 +01:00
Michał Wawrzyniec Urbańczyk
192440bedd
derive(Iterator) support for structs with fields of dependent types (#412)
This adds support for using `derive(Iterator)` to iterate over such structures like 
```rust 
struct Foo<T> { 
    a:(T,U,T), 
    b:Option<T> 
}
```
i.e. where fields are dependent over last type argument, however they do not store it directly.

Dependent types like `Option<T>` are required to provide a compatible `iter` method.

Implements #407.
2019-12-21 03:55:39 +01:00
Marcin Kostrzewa
1eed651728
Interpreter lifecycle & Module changes (#414) 2019-12-20 16:02:34 +01:00
Michał Wawrzyniec Urbańczyk
3455d75101
derive(Iterator) support for enum types (#387)
This PR extends `derive(Iterator)` proc macro to support enumeration type when they have variants with a single unnamed field, that implements `IntoIterator`.
Thanks to that, it is now finally possible to derive iterator for the `Shape` type and similar enum types used in AST.
Implements #385
2019-12-18 14:30:46 +01:00
Josef
0b9664de60
Integrating Scala Parser Into Rust. (#362) 2019-12-17 14:33:21 +01:00
Michał Wawrzyniec Urbańczyk
68c6ceff40
Completing Rust AST data structures (#378)
This pull request adjusts AST data structures in Scala and Rust to be compatible, while also fixing a number of JSON format mismatches find along the way. This implements #336.
2019-12-16 14:03:59 +01:00
Ara Adkins
c3acc5c615
Complete AST to AstExpression translation (#374) 2019-12-06 19:22:20 +00:00
Josef
8ae06e0f09
support escaping in raw strings (#369) 2019-12-05 11:13:46 +01:00
Ara Adkins
db4cbacec3
Add suspended blocks, fix thunk performance (#371)
This commit adds support for suspended blocks in the interpreter and also fixes 
a major performance issue with nested thunks that was causing quadratic 
evaluation time.
2019-12-04 16:00:53 +00:00
Michał Wawrzyniec Urbańczyk
07baa9212b
Scala/Rust JSON serialization protocol unification (#370)
This PR updates JSON serialization in Scala in Rust, so they are compatible, implementing #297. The parser wrapper now uses the real AST in API. Still most of non-trivial use-cases will fail. Once #336 is done, it should finally work.
2019-12-04 16:34:54 +01:00
Marcin Kostrzewa
c7b3d31415
Source locations in Truffle nodes (#368) 2019-12-02 19:41:46 +01:00
Michał Wawrzyniec Urbańczyk
47f9a4889c
Scala AST refactoring (#360)
A new implementation of Scala AST, as described in #352.
2019-12-02 14:30:37 +01:00
Marcin Kostrzewa
6bc14a3b9f Add a tiny subset of nodelocs (#364) 2019-11-29 12:36:48 +00:00
Marcin Kostrzewa
8432a9695a
Absolute code locations (#363) 2019-11-29 10:27:34 +01:00
Maciej Mikołajek
5ce9f0b023
Documentation Generator: Styles (#359)
* wip

* up style

* WD changes

* @wdanilo - should be ready

* Tuple -> case class

* hide bodies in constructors

* rm test

* final touches
2019-11-27 21:05:48 +01:00
Ara Adkins
9a4332108f
Add lambdas, types, and methods support to new syntax (#358) 2019-11-27 11:32:36 +00:00
Maciej Mikołajek
1e3e105232
Documentation Parser: Fix lists parsing, changes to HTML file rendering (#357)
* save a questionable bit of code

* Fix indentation manager by introducing stack of indents

* more fixes

* ui wip

* HTML Rendering change - first module name, then documentation, last
module functions

* Apply changes requested by @wdanilo
2019-11-27 00:48:35 +01:00
Josef
9665150c5d
Enable Scalajs For Syntax (#329) 2019-11-26 14:02:50 +01:00
Maciej Mikołajek
05877a7d0c
Documentation Parser: Extended HTML Files Generator (#237)
* Update CSS

* Add some code - WIP

* recursive Documented HTML generation

* WIP - Better documentation, better code, better test

* documentation wip

* code complexity changes

* update  docs

* update docs

* move saving out of class

* move all html generator code to separate object

* Fix documentation

* Change example text

* 80 chars/ln

* Merge remote-tracking branch 'origin/master' into wip/mm/doc-parser-html-output

# Conflicts:
#	Syntax/specialization/src/main/scala/org/enso/syntax/text/Parser.scala

* Merge remote-tracking branch 'origin/master' into wip/mm/doc-parser-html-output

# Conflicts:
#	Syntax/specialization/src/main/scala/org/enso/syntax/text/Parser.scala

* just add example

* add sass

* minor fix

* cleanup

* rm unused func
2019-11-25 10:36:31 +01:00
Michał Wawrzyniec Urbańczyk
e51a06e263
Initial Rust AST implementation (#348)
AST lives in `ast` package, that relies significantly on `ast-macros` to generate boilerplate.
Additional `macro-utils` library was split out from `shapely-macros` and `ast-macros`.

The implementation was contributed by @wdanilo , I basically just did some refactoring, documenting and testing.

### Important Notes
* AST is known to be incomplete structurally, finishing it is #336 
* AST is missing a number of necessary functions, some of them explicitly marked as FIXME in the code, finishing them is #338 
* while I have written some tests, they are not yet part of CI — I want to this smart way (i.e. allowing tests that rely on parser), it is tracked as #340 
* AST JSON serialization is incompatible with Scala, solving this is #297 
* there is some non-deterministic issue with CI on Windows — I need to look into this closer but it seems to not be related to any Rust parts
2019-11-22 15:21:18 +01:00
Ara Adkins
b91ab25fdb
Translate arith expressions using the new parser (#346) 2019-11-20 09:18:53 +00:00
Michał Wawrzyniec Urbańczyk
d1796345a4
The prelude library, coming from basegl, in preparation for AST. (#342) 2019-11-19 22:26:54 +01:00
Michał Wawrzyniec Urbańczyk
6078b54f50
Wrapping parser for Rust (#325)
* deriving JSON Encoder for Scala AST types
* websocket-based Parser Service
* wrapper for Parser in Rust that includes client for Parser Service
2019-11-18 14:12:16 +01:00
Ara Adkins
22aa4efda8
Add a low-level graph library (#334) 2019-11-18 11:18:16 +00:00
Josef
8da25bec2d
Text AST Reimplementation. (#327) 2019-11-14 13:55:45 +01:00
Ara Adkins
bfe81a731f
Reorganise repo for further development (#308) 2019-11-08 17:32:48 +00:00