Procházet zdrojové kódy

define first task, update dev doc ref

tcheukueppo před 2 roky
rodič
revize
ee557db5f7
4 změnil soubory, kde provedl 11 přidání a 49 odebrání
  1. 1 1
      README.md
  2. 2 39
      Roadmap.md
  3. 6 5
      docs/maat_dev_ref/maat.md
  4. 2 4
      docs/maat_dev_ref/objects/Array.md

+ 1 - 1
README.md

@@ -1,2 +1,2 @@
-pity
+Maat
 ====

+ 2 - 39
Roadmap.md

@@ -1,40 +1,3 @@
-# Roadmap for building the pity interpreter
+# Roadmap for building the maat interpreter
 
-- Build the AST data structure
-- Build pity lexer and test
-- Implement the basic functionality of Pity objects just for the sake of completely accomplish the parsing process and test
-- Write a module for interacting with PRCE2 and implement the `Regex` and `Match` object
-- Build AST by parsing Tokens
-- Write Deparser for testing AST
-- Setup the list of pity vm opcodes
-- Build compiler data structure
-- Implement the compiler and its debugger (While compiling, apply Tail Call optimization and NaN Boxing). Test, test, and test
-- Implement the bytecode runner. Test, test and test
-- Complete the implementation of pity objects, test, test and test
-- Optimize the AST with the following optimizations
-
-1. Constant folding, test AST by deparsing
-2. Common subexpression elimination, test AST ...
-3. Dead code elimination, test AST ...
-
-- Apply the following optimization during the compilation process
-
-1. Constant propagation, test compiler
-2. Code hoisting, test compiler
-3. (Maybe)? Register Allocation, test compiler
-
-- Make the deparser be `pityfy` for pityfying
-- Test language features individualy
-- Test objects
-- Write 150 rosetta codes to test `pity` as a whole
-- Write documentation
-- Call friends to make builders for plan9, BSDs, Linux, Mac and Windows platforms
-- Call friends to setup CI/CD pipeline to package build pity for the following linux and BSD distributions
-
-1. (Open|Free|Net)BSD
-2. Debian & Ubuntu
-3. Alpine Linux
-4. Archlinux
-5. 
-
-- Call friends/(or why not me?) to make windows installer GUI app
+- Define platforms independent data types

+ 6 - 5
docs/maat_dev_ref/maat.md

@@ -177,7 +177,7 @@ Declare package variables with the keyword `global`, lexically scoped variables
 
 ```
 package One::Two {
-    global x = w<one two three>
+    global x = a<one two three>
 
     var a = { one => 1 }
     {
@@ -190,9 +190,9 @@ package One::Two {
         say One::Two::x
     }
 
-    -- a: {one => 1}
+    -- output: h{one 1}
     a.say
-    -- x: ["one", "two", "three"], unchanged!
+    -- output: a<one two three>
     x.say
 }
 
@@ -205,7 +205,7 @@ package One::Two::Three {
 }
 ```
 
-In regard to functions, static variables are lexically scoped variables which retains their values between
+In regards to functions, static variables are lexically scoped variables which retains their values between
 function and block(during recursion or jumps with a loop control) calls. We declare static lexically scoped
 variables with the `state` keyword.
 
@@ -221,7 +221,7 @@ increment(0, 9).say
 constant variables are lexically scoped by default unless you precise they're global with the global keyword.
 
 ```
--- lexically scoped constant
+-- lexically scoped declaration of a constant
 const z = 4
 
 -- a constant global
@@ -286,6 +286,7 @@ each types here.
 - Num
 - Rat
 - Str
+- Range
 - Array
 - Map
 - Set

+ 2 - 4
docs/maat_dev_ref/objects/Array.md

@@ -22,10 +22,8 @@ var c = Array.new(2, 3, "four", a<5 6>)
 - Maat is dynamically and at the same time statically type and thus type errors aren't raised unless necessary
 - `->` Specifies the return type
 - `|` Stands for alternation, so for example `-> Num | Array` means to return either a `Num` or an `Array`
-- `[]` Simply means the rest of the arguments are optional
-- `EXP`: represents an expression, see maat's BNF for what is an expression
-
-### Note
+- `[]` Surrounding an argument simply means the argument is optional
+- `Expr`: represents an expression, see maat's BNF to know what is an expression
 
 Let `a` be a variable containing an object of type `Array`, `a` supports the following methods: