Skip to content

Commit 044ab83

Browse files
committed
turned todo into open issues, added unicode example
1 parent b0904af commit 044ab83

File tree

2 files changed

+16
-15
lines changed

2 files changed

+16
-15
lines changed

README.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ print, log, macros and more
3737

3838
### Reading notes
3939

40+
See [Open Issues](https://github.com/ldemailly/gorepl/issues) for what's left to do
41+
4042
- See the commit history for improvements/changes (e.g redundant state in lexer etc)
4143

4244
- [x] interface nil check in parser
4345

4446
- [x] Do we really need all these `let `, wouldn't `x = a + 3` be enough? made optional
45-
- [ ] remove let entirely ?
46-
- [ ] no let for macros?
4747

48-
- [ ] Seems like ast and object are redundant to a large extent
48+
- Seems like ast and object are redundant to a large extent
4949

5050
- [x] Introduced errors sooner, it's sort of obviously needed
5151

@@ -55,49 +55,49 @@ print, log, macros and more
5555

5656
- [x] made built ins like len() tokens (cheaper than carrying the string version during eval)
5757

58-
- [ ] fix up == and != in 3 places (int, string and default)
58+
- fix up == and != in 3 places (int, string and default)
5959

60-
- [ ] change int to ... float? number? or rather add float/double (maybe also or big int?...)
60+
- change int to ... float? number? or rather add float/double (maybe also or big int?...)
6161

62-
- [ ] use + for concat of arrays and merging of maps
62+
- [x] use + for concat of arrays and merging of maps
6363

6464
- [x] call maps maps and not hash (or maybe assoc array but that's long)
6565

6666
- [x] don't make a slice to join with , when there is already a strings builder. replace byte buffers by string builder.
6767

6868
- [x] generalized tokenized built in (token id based instead of string)
6969

70-
- [ ] Add "extension" internal functions (calling into a go function), with variadic params, param types etc
70+
- Add "extension" internal functions (calling into a go function), with variadic params, param types etc
7171

7272
- [x] Identifiers are letter followed by alphanum*
7373

7474
- [x] map of interface correctly equals the actual underlying types, no need for custom hashing
7575
-> implies death to pointers (need non pointer receiver and use plain objects and not references)
7676

77-
- [ ] unicode
77+
- unicode (work as is in strings already)
7878

7979
- [x] flags for showing parse or not (default not pass `-parse` to see parsing)
8080

8181
- [x] file input vs stdin repl (made up .gr for gorepl)
8282

83-
- [ ] actual name for the language - it's not monkey (though it's monkey compatible, just better/simpler/...)
83+
- actual name for the language - it's not monkey (though it's monkey ~~compatible~~ derived, just better/simpler/...)
8484

85-
- [ ] multiline support in stdin repl
85+
- multiline support in stdin repl
8686

87-
- [x] add >= and <= comparaison operators
87+
- [x] add >= and <= comparison operators
8888

8989
- [x] add comments support (line)
90-
- [ ] add /* */ style
90+
- add /* */ style
9191

92-
- [ ] line numbers for errors (for file mode)
92+
- line numbers for errors (for file mode)
9393

9494
- [x] use `func` instead of `fn` for functions
9595

9696
- [x] figure out how to get syntax highlighting (go style closest - done thx to viulisti -> .gitattributes)
9797

98-
- [ ] assignment to maps and arrays
98+
- assignment to maps keys and arrays indexes
9999

100-
- [ ] for loop
100+
- for loop
101101

102102
- [x] switched to non pointer receivers in Object and (base/integer) Ast so equality checks in maps work without special hashing (big win)
103103

sample.gr

+1
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ a=[fact(5), "abc", 76-3] // array can contain different types
2525
m={"key": a, 73: 29} // so do maps
2626

2727
print("m is:", m, "\n") // stdout print
28+
print("Outputting a smiley: 😀\n")
2829

2930
first(m["key"]) // get the value from key from map, which is an array, and the first element of the array is our factorial 5
3031
// could also have been m["key"][0]

0 commit comments

Comments
 (0)