mirror of
https://codeberg.org/ProgramSnail/lang_2023.git
synced 2026-01-25 13:07:13 +00:00
grammar refactoring: build_visitor fixed & visitors tested
This commit is contained in:
parent
3c2d496a85
commit
e4802896bd
35 changed files with 118128 additions and 91770 deletions
|
|
@ -1,12 +1,3 @@
|
|||
// ?? value - parametric classes ??
|
||||
|
||||
// struct fields/etc. accessible from everywere
|
||||
// class fields/etc. accessible only from namespace of class or class instance (from "methods")
|
||||
|
||||
// points at the beginning of constructor name - amount of needed constructor prefixes ?
|
||||
|
||||
// ?? how to make class compositons ??
|
||||
|
||||
struct Fruit =
|
||||
| Apple
|
||||
| Orange
|
||||
|
|
@ -20,13 +11,13 @@ struct (Result : #Move) 'A 'B =
|
|||
| & 'A
|
||||
| Error & 'B
|
||||
|
||||
// struct (Complex : #Value) =
|
||||
// & Float(0.0)
|
||||
// & Float(0.0)
|
||||
//
|
||||
// struct Task =
|
||||
// & name("Task") : String
|
||||
// & duration(0.0) : Float
|
||||
struct (Complex : #Value) =
|
||||
& Float
|
||||
& Float
|
||||
|
||||
struct Task =
|
||||
& name : String
|
||||
& duration : Float
|
||||
|
||||
class Employee =
|
||||
& name : String
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue