~repos /plum

#treesitter#compiler#wasm

git clone https://pyrossh.dev/repos/plum.git

A statically typed, imperative programming language inspired by rust, python


afb772e8 pyrossh

1 year ago
improve syntax
libs/std/bool.plum CHANGED
@@ -6,17 +6,20 @@ Bool =
6
6
 
7
7
  # Might not be needed
8
8
  Bool\toStr() -> Str =
9
+ if this == True
9
- "True"
10
+ "True"
11
+ else
12
+ "False"
10
13
 
11
14
  Bool\and(other: Bool) -> Bool =
12
- match self, other is
15
+ match this, other is
13
16
  True, True => True
14
17
  True, False => False
15
18
  False, True => False
16
19
  False, False => False
17
20
 
18
21
  Bool\or(other: Bool) -> Bool =
19
- match self, other is
22
+ match this, other is
20
23
  True, True => True
21
24
  True, False => True
22
25
  False, True => True
libs/std/float.plum CHANGED
@@ -1,3 +1,50 @@
1
+ module std/float
2
+
3
+ # Euler's number, the base of natural logarithms, e, https://oeis.org/A001113
4
+ E = 2.718f
5
+
6
+ # The natural logarithm of 10, https://oeis.org/A002392
7
+ LN10 = 2.302f
8
+
9
+ # The natural logarithm of 2 https://oeis.org/A002162
10
+ LN2 = 0.693f
11
+
12
+ # The base 10 logarithm of e # formula: 1 / LN10
13
+ LOG10E = 0.434f
14
+
15
+ # The base 2 logarithm of e # formula: 1 / LN2
16
+ LOG2E = 1.442f
17
+
18
+ # The ratio of the circumference of a circle to its diameter https://oeis.org/A000796
19
+ PI = 3.14159f
20
+
21
+ # https://oeis.org/A001622
22
+ PHI = 1.6180f
23
+
24
+ # The square root of 1/2
25
+ SQRT1_2 = 0.707f
26
+
27
+ # The square root of 2 https://oeis.org/A002193
28
+ SQRT2 = 1.414f
29
+
30
+ # https://oeis.org/A019774
31
+ SQRT_E = 1.64872f
32
+
33
+ # https://oeis.org/A002161
34
+ SQRT_PI = 1.77245f
35
+
36
+ # https://oeis.org/A139339
37
+ SQRT_PHI = 1.27201f
38
+
39
+ # The difference between 1 and the smallest floating point number greater than 1 formula: 7/3 - 4/3 - 1
40
+ EPSILON = 2.220446049250313e-16f
41
+
42
+ # Lowest value of float
43
+ MIN_FLOAT_VALUE = 4.9406564584124654417656879286822137236505980e-324
44
+
45
+ # Highest value of float
46
+ MAX_FLOAT_VALUE = 1.79769313486231570814527423731704356798070e+308
47
+
1
48
  Float::PI=3.14
2
49
 
3
50
  fn acosh(v: float): float =
libs/std/http.plum CHANGED
@@ -5,20 +5,21 @@ import std/os
5
5
  import std/http/content_type
6
6
 
7
7
  Response = (
8
- headers: Map[Str, Str]
8
+ headers: Map(Str, Str)
9
9
  body: Str | Buffer | IO
10
10
  status: Int
11
11
  )
12
12
 
13
13
  createFileResponse(path: Str) -> Response | IOError =
14
- content := content_type.fromExt(path.ext())
14
+ content = content_type.fromExt(path.ext())
15
- data := os.readFile(file)?
15
+ data = os.readFile(file)?
16
16
  Response()
17
17
  .header("Content-Type", content)
18
+ .contentType(.ApplicationJS)
18
19
  .body(data)
19
20
  .status(200)
20
21
 
21
- index() -> Response! =
22
+ index() -> Response | IOError =
22
23
  createFileResponse("index.html")
23
24
 
24
25
  serveFile(file: Str) -> Response | IOError =
libs/std/int.plum CHANGED
@@ -1,67 +1,22 @@
1
1
  module std/int
2
2
 
3
- # Euler's number, the base of natural logarithms, e, https://oeis.org/A001113
4
- E = 2.718f
5
-
6
- # The natural logarithm of 10, https://oeis.org/A002392
7
- LN10 = 2.302f
8
-
9
- # The natural logarithm of 2 https://oeis.org/A002162
10
- LN2 = 0.693f
11
-
12
- # The base 10 logarithm of e # formula: 1 / LN10
13
- LOG10E = 0.434f
14
-
15
- # The base 2 logarithm of e # formula: 1 / LN2
16
- LOG2E = 1.442f
17
-
18
- # The ratio of the circumference of a circle to its diameter https://oeis.org/A000796
19
- PI = 3.14159f
20
-
21
- # https://oeis.org/A001622
22
- PHI = 1.6180f
23
-
24
- # The square root of 1/2
3
+ Int: Comparable, ToStr = ByteArray
25
- SQRT1_2 = 0.707f
26
-
27
- # The square root of 2 https://oeis.org/A002193
28
- SQRT2 = 1.414f
29
-
30
- # https://oeis.org/A019774
31
- SQRT_E = 1.64872f
32
-
33
- # https://oeis.org/A002161
34
- SQRT_PI = 1.77245f
35
-
36
- # https://oeis.org/A139339
37
- SQRT_PHI = 1.27201f
38
-
39
- # The difference between 1 and the smallest floating point number greater than 1 formula: 7/3 - 4/3 - 1
40
- EPSILON = 2.220446049250313e-16f
41
-
42
- # Lowest value of int
43
- MIN_INT_VALUE = -0x8000_0000_0000_0000
44
-
45
- # Highest value of int
46
- MAX_INT_VALUE = 0x7FFF_FFFF_FFFF_FFFF
47
4
 
48
- # Lowest valur of float
5
+ # Lowest value of Int
49
- MIN_FLOAT_VALUE = 4.9406564584124654417656879286822137236505980e-324
6
+ Int::MIN_VALUE = -0x8000_0000_0000_0000
50
7
 
51
- # Highest valur of float
8
+ # Highest value of Int
52
- MAX_FLOAT_VALUE = 1.79769313486231570814527423731704356798070e+308
9
+ Int::MAX_VALUE = 0x7FFF_FFFF_FFFF_FFFF
53
10
 
54
11
  # 2**28
55
- LARGE = 1 << 28
12
+ Int::LARGE = 1 << 28
56
-
57
- Int: Comparable, ToStr = ByteArray
58
13
 
59
14
  Int::random(): Float =
60
- todo
15
+ todo
61
16
 
62
17
  # returns the absolute value of the Int
63
18
  Int\abs() -> Int =
64
- self < 0 ? -self : self
19
+ this < 0 ? -this : this
65
20
 
66
21
  Int\ceil() -> Float =
67
22
  todo
@@ -88,16 +43,16 @@ Int\logb() -> Float =
88
43
  todo
89
44
 
90
45
  Int\pow(y: Float) -> Float =
91
- LibM.pow(self, y)
46
+ LibM.pow(this, y)
92
47
 
93
48
  Int\pow(y: Int) -> Float =
94
- pow(y.toFloat())
49
+ pow(y.toFloat())
95
50
 
96
51
  Int\sqrt() -> Float =
97
52
  if this < 0.0 then
98
53
  _nan()
99
54
  else
100
- LibM.sqrt(self)
55
+ LibM.sqrt(this)
101
56
  end
102
57
 
103
58
  Int\asin(v: Float) =
libs/std/list.plum CHANGED
@@ -1,227 +1,176 @@
1
1
  module std
2
2
 
3
- record List[V](
4
- `A list is a data structure describing a contiguous section of an array stored separately from the slice variable itself.
5
- `It contains the pointers to the start and end nodes (head, tail) and maintains the size as well
3
+ # A node stores the data in a list and contains pointers to the previous and next sibling nodes
6
- head: node[V]?
4
+ Node = {
7
- tail: node[V]?
8
- _size: int
5
+ value: V
9
- ) {
6
+ prev: Node(a) | Nil
10
- fn of(values: ...V) -> List[V] {
7
+ next: Node(a) | Nil
11
- }
12
8
  }
13
9
 
14
- record node[V](
10
+ # A list is a data structure describing a contiguous section of an array stored separately from the slice variable itself.
15
- `A node stores the data in a list and contains pointers to the previous and next sibling nodes
11
+ # It contains the pointers to the start and end nodes (head, tail) and maintains the size as well
16
- value: V
12
+ List = {
17
- prev: node[V]?
18
- next: node[V]?
13
+ head: Node(a) | Nil
14
+ tail: Node(a) | Nil
15
+ size: Int
19
- )
16
+ }
20
17
 
21
- fn listOf[A](values: ...A): list[A] =
18
+ List(values: ...a) -> List(a) =
22
- list[A]().add(values)
19
+ List().add(values)
23
20
 
24
- fn (List) get(i: int) -> A =
25
- `gets the element at i'th index of the list
21
+ # gets the element at i'th index of the list
22
+ List\get(i: Int) -> a =
26
- current := l.head
23
+ current = l.head
27
- index := 0
24
+ index = 0
28
- while current != nil
25
+ while current != Nil
29
26
  if index == i
30
27
  current.value
31
28
  else
32
29
  current = current.next
33
30
  index += 1
34
31
 
35
- fn (List) set(i: int, v: V) -> A =
36
- `sets the element at i'th index of the list
32
+ # sets the element at i'th index of the list
33
+ List\set(i: Int, v: a) -> a =
37
- pass
34
+ todo
38
35
 
39
- fn (List) length() -> A =
40
- `returns the no of elements in the list
36
+ # returns the no of elements in the list
37
+ List\length() -> a =
41
- _size
38
+ self.size
42
39
 
43
- fn (List) add(values: ...V) =
44
- `adds the specified elements to the start of the list
40
+ # adds the specified elements to the start of the list
41
+ List\add(values: ...V) =
45
- for v := range values
42
+ for v in values
46
- l.head = node(value: v, prev: nil, next: l.head)
43
+ l.head = Node(value: v, prev: Nil, next: l.head)
47
44
  l.head.next.prev = l.head
48
- l._size += 1
45
+ l.size += 1
49
46
 
50
- fn (List) removeAt(i int) =
51
- `removes the element at i'th index of the list
47
+ # removes the element at i'th index of the list
48
+ List\removeAt(i: Int) =
52
- l.tail?.prev?.next = nil
49
+ l.tail?.prev?.next = Nil
53
- `old tail node gets deallocated due to zero reference count
50
+ # old tail node gets deallocated due to zero reference count
54
51
  l.tail = list.tail?.prev
55
- l._size -= 1
52
+ l.size -= 1
56
53
 
57
- fn (List) remove(v V) =
58
- `removes the element v from list
54
+ # removes the element v from list
55
+ List\remove(v: a) =
59
- l.tail?.prev?.next = nil
56
+ l.tail?.prev?.next = Nil
60
- `old tail node gets deallocated due to zero reference count
57
+ # old tail node gets deallocated due to zero reference count
61
58
  l.tail = list.tail?.prev
62
- l._size -= 1
59
+ l.size -= 1
63
60
 
64
- fn (List) clear() =
65
- `removes all objects from this list
61
+ # removes all objects from this list
62
+ List\clear() =
66
- l.tail?.prev?.next = nil
63
+ l.tail?.prev?.next = Nil
67
64
  `old tail node gets deallocated due to zero reference count
68
65
  l.tail = list.tail?.prev
69
- l._size -= 1
66
+ l.size -= 1
70
-
71
67
 
72
- fn (List) reverse(v: fn(v: V): true): list[A] =
73
- `returns a new list with the elements in reverse order.
74
- pass
75
68
 
76
- fn (List) sort(sorter: fn(v: V): true): list[A] =
77
- `returns a new list with the elements sorted by sorter
69
+ # returns a new list with the elements in reverse order.
70
+ List\reverse(v: fn(v: a) -> Bool) -> List[A] =
78
- pass
71
+ todo
79
72
 
80
- fn (List) find(search: V): V?, int =
81
- `returns an item and index in the list if the item is is equal to search item
73
+ # returns a new list with the elements sorted by sorter
74
+ List\sort(sorter: fn(v: a) -> Bool) -> List(A) =
82
- pass
75
+ todo
83
76
 
84
- fn (List) contains(v: V): bool =
85
- `returns the index of an item in the list if present and comparable otherwise nil
77
+ # returns an item and index in the list if the item is is equal to search item
86
- pass
87
-
88
- fn (l: list[T]) op_range(yld: fn(v: T): bool): bool =
89
- `range over func for a list
78
+ List\find(search: V): V | Nil =
90
- current := l.head
91
- while current != nil
92
- if !yld(current.value)
93
- return false
94
- current = current.next
95
- true
79
+ todo
96
80
 
97
- fn (List) op_spread(other: list): list[A] =
98
- `combines this list with other list and returns a new list
81
+ # returns the index of an item in the list if present and comparable otherwise Nil
82
+ List\contains(v: a) -> Bool =
99
- pass
83
+ todo
100
84
 
101
- fn (List) each(cb: fn(v: V)): void =
102
- `calls f for each elem in the list
85
+ # calls f for each elem in the list
86
+ List\each(cb: fn(v: a)) -> Unit =
103
87
  current := l.head
104
- while current != nil
88
+ while current != Nil
105
89
  cb(current.value)
106
90
  current = current.next
107
91
 
108
- fn (List) map[B](cb: fn(v: V): B): list[A] =
109
- `returns a list made up of B elements for each elem in the list
92
+ # returns a list made up of B elements for each elem in the list
93
+ List\map(cb: fn(v: a) -> b) -> List(b) =
110
94
  nl := []
111
95
  current := l.head
112
- while current != nil
96
+ while current != Nil
113
97
  item := cb(current.value)
114
98
  nl.push(item)
115
99
  nl
116
100
 
117
- fn (List) flatMap() =
118
- `returns a new list with all elements shuffled`
101
+ # returns a new list with all elements shuffled`
102
+ List\flatMap() =
119
- pass
103
+ todo
120
104
 
121
- fn (List) retain(predicate: fn(v: V): A): list[A] =
122
- `returns a new list with the elements that matched the predicate
105
+ # returns a new list with the elements that matched the predicate
106
+ List\retain(predicate: fn(v: a) -> A) -> List(A) =
123
- pass
107
+ todo
124
108
 
125
- fn (List) reject(predicate: fn(v: V): A): list[A] =
126
- `returns a new list with the elements that matched the predicate removed
109
+ # returns a new list with the elements that matched the predicate removed
110
+ List\reject(predicate: fn(v: a) -> A) -> List(A) =
127
- pass
111
+ todo
128
112
 
129
- fn (List) any(predicate: fn(v: V): bool): bool =
130
- `returns true if any element in the list satisfies the predicate
113
+ # returns true if any element in the list satisfies the predicate
114
+ List\any(predicate: fn(v: a) -> Bool) -> Bool =
131
- pass
115
+ todo
132
116
 
133
- fn (List) every(predicate: fn(v: V): bool): bool =
134
- `returns true if all of the elements in the list satisfies the predicate
117
+ # returns true if all of the elements in the list satisfies the predicate
118
+ List\every(predicate: fn(v: a) -> Bool) -> Bool =
135
- pass
119
+ todo
136
120
 
137
- fn (List) reduce[B](acc: B, cb: fn(v: V): A): B =
138
- `returns the accumulated value of all the elements in the list
121
+ # returns the accumulated value of all the elements in the list
122
+ List\reduce[B](acc: B, cb: fn(v: a) -> A): B =
139
- pass
123
+ todo
140
124
 
141
- fn (List) first(): A? =
142
- `returns the first element in the list
125
+ # returns the first element in the list
126
+ List\first() -> a | Nil =
143
127
  l.head?.value
144
128
 
145
- fn (List) last(): A? =
146
- `returns the last element in the list
129
+ # returns the last element in the list
130
+ List\last() -> a | Nil =
147
131
  l.tail?.value
148
132
 
149
- fn (List) sublist(start: int, end: int): list[A] =
150
- `returns a list containing the first n elements of the given list
133
+ # returns a list containing the first n elements of the given list
134
+ List\sublist(start: int, end: int) -> List(A) =
151
- pass
135
+ todo
152
136
 
153
- fn (List) take(n: int): list[A] =
154
- `returns a list containing the first n elements of the given list
137
+ # returns a list containing the first n elements of the given list
138
+ List\take(n: int) -> List(A) =
155
- pass
139
+ todo
156
140
 
157
- fn (List) skip(n: int): list[A] =
158
- `returns a list containing the first n elements of the given list
141
+ # returns a list containing the first n elements of the given list
142
+ List\skip(n: int) -> List(A) =
159
- pass
143
+ todo
160
144
 
161
- fn (List) drop(n: int): list[A] =
162
- `Returns a list containing the first n elements of the given list
145
+ `Returns a list containing the first n elements of the given list
146
+ List\drop(n: int) -> List(A) =
147
+ todo
163
148
 
164
- fn (List) sample() =
165
- `returns a new list with some of the elements taken randomly`
149
+ # returns a new list with some of the elements taken randomly`
150
+ List\sample() =
166
- pass
151
+ todo
167
152
 
168
- fn (List) shuffle() =
169
- `returns a new list with all elements shuffled`
153
+ # returns a new list with all elements shuffled`
154
+ List\shuffle() =
170
- pass
155
+ todo
171
156
 
172
- fn (List) partition() =
173
- `returns a new list with all elements shuffled`
157
+ # returns a new list with all elements shuffled`
158
+ List\partition() =
174
- pass
159
+ todo
175
160
 
176
- fn (List) chunk() =
177
- `returns a new list with all elements shuffled`
161
+ # returns a new list with all elements shuffled`
162
+ List\chunk() =
178
- pass
163
+ todo
179
164
 
180
- fn (List) groupBy() =
181
- `returns a new list with all elements grouped`
165
+ # returns a new list with all elements grouped`
166
+ List\groupBy() =
182
- pass
167
+ todo
183
168
 
184
- fn (List) join(sep: str = ","): str =
169
+ List\join(sep: Str = ",") -> Str =
185
170
  res := Buffer()
186
171
  l.each() |v|
187
172
  if @HasTrait(V, ToStr)
188
173
  res.write(v.to_str(), sep)
189
174
  else
190
175
  res.write(@TypeToString(v), sep)
191
- res.to_str()
176
+ res.to_str()
192
-
193
-
194
- trait List[T] permits Empty, Link {
195
- fn each(cb: fn(v: T))
196
- fn length() -> Int
197
- fn append(v: V) -> List[T]
198
- fn prepend(v: V) -> List[T]
199
- fn append(values: ...V) -> List[T]
200
- }
201
-
202
- fn listOf(values: ...T) -> List[T] {
203
- return Link[T].append(values)
204
- }
205
-
206
- tuple Empty(): List[_] {
207
- fn each(cb: fn(v: T)) {}
208
- fn append(v: V) -> List[T] {
209
- return Link(v, Empty)
210
- }
211
- fn prepend(v: V) -> List[T] {
212
- return Link(v, Empty)
213
- }
214
- }
215
-
216
- tuple Link[T](T, List[T]): List[T] {
217
- fn each(cb: fn(v: T)) {
218
- cb(a)
219
- self.1.each(cb)
220
- }
221
- fn append(v: V) {
222
- self.last().rest = Link(v, Empty)
223
- }
224
- fn prepend(v: V) {
225
- self.first() = Link(v, self.1)
226
- }
227
- }
libs/std/map.plum CHANGED
@@ -22,7 +22,7 @@ Map\add(kvs: ...Pair) =
22
22
 
23
23
  # Get a value from the Map using key k
24
24
  Map\get(k: a) -> b | Nil =
25
- for k, v in self
25
+ for k, v in items do
26
26
  if k == k
27
27
  return v
28
28
  Nil
libs/std/os.mi DELETED
@@ -1,48 +0,0 @@
1
- module std
2
-
3
- fn printLn(): IOError =
4
- `Writes the specified data, followed by the current line terminator, to the standard output stream.
5
- pass
6
-
7
- fn readFile(path: str): IO =
8
- `Returns a stream to a file from the fs
9
- pass
10
-
11
- fn writeFile(path: str, data: IO)
12
- pass
13
-
14
-
15
- fn access(path[, mode])
16
- fn appendFile(path, data[, options])
17
- fn chmod(path, mode)
18
- fn chown(path, uid, gid)
19
- fn copyFile(src, dest[, mode])
20
- fn cp(src, dest[, options])
21
- fn lchmod(path, mode)
22
- fn lchown(path, uid, gid)
23
- fn lutimes(path, atime, mtime)
24
- fn link(existingPath, newPath)
25
- fn lstat(path[, options])
26
- fn mkdir(path[, options])
27
- fn mkdtemp(prefix[, options])
28
- fn open(path, flags[, mode])
29
- fn opendir(path[, options])
30
- fn readdir(path[, options])
31
- fn readFile(path[, options])
32
- fn readlink(path[, options])
33
- fn realpath(path[, options])
34
- fn rename(oldPath, newPath)
35
- fn rmdir(path[, options])
36
- fn rm(path[, options])
37
- fn stat(path[, options])
38
- fn statfs(path[, options])
39
- fn symlink(target, path[, type])
40
- fn truncate(path[, len])
41
- fn unlink(path)
42
- fn utimes(path, atime, mtime)
43
- fn watch(filename[, options])
44
-
45
-
46
- O_RDWR,
47
- O_CREAT,
48
- O_EXCL,
libs/std/os.plum ADDED
@@ -0,0 +1,100 @@
1
+ module std/os
2
+
3
+ stdin = File("/dev/stdin")
4
+ stdout = File("/dev/stdout")
5
+ stderr = File("/dev/stderr")
6
+
7
+ # Writes the specified data, followed by the current line terminator, to the standard output stream.
8
+ printLn(s: Str) -> IOError =
9
+ writeFile(stdout, s)
10
+
11
+ # Returns a stream to a file from the fs
12
+ readFile(path: str) -> IO =
13
+ todo
14
+
15
+ writeFile(path: str, data: IO)
16
+ todo
17
+
18
+ access(path[, mode]) =
19
+ todo
20
+
21
+ appendFile(path, data[, options]) =
22
+ todo
23
+
24
+ chmod(path, mode) =
25
+ todo
26
+
27
+ chown(path, uid, gid) =
28
+ todo
29
+
30
+ copyFile(src, dest[, mode]) =
31
+ todo
32
+
33
+ cp(src, dest[, options]) =
34
+ todo
35
+
36
+ lchmod(path, mode) =
37
+ todo
38
+
39
+ lchown(path, uid, gid) =
40
+ todo
41
+
42
+ lutimes(path, atime, mtime) =
43
+ todo
44
+
45
+ link(existingPath, newPath) =
46
+ todo
47
+
48
+ lstat(path[, options]) =
49
+ todo
50
+
51
+ mkdir(path[, options]) =
52
+ todo
53
+
54
+ mkdtemp(prefix[, options]) =
55
+ todo
56
+
57
+ open(path, flags[, mode]) =
58
+ todo
59
+
60
+ opendir(path[, options]) =
61
+ todo
62
+
63
+ readdir(path[, options]) =
64
+ todo
65
+
66
+ readlink(path[, options]) =
67
+ todo
68
+
69
+ realpath(path[, options]) =
70
+ todo
71
+
72
+ rename(oldPath, newPath) =
73
+ todo
74
+
75
+ rmdir(path[, options]) =
76
+ todo
77
+
78
+ rm(path[, options]) =
79
+ todo
80
+
81
+ stat(path[, options]) =
82
+ todo
83
+
84
+ statfs(path[, options]) =
85
+ todo
86
+
87
+ symlink(target, path[, type]) =
88
+ todo
89
+
90
+ truncate(path[, len]) =
91
+ todo
92
+
93
+ unlink(path) =
94
+ todo
95
+
96
+ utimes(path, atime, mtime) =
97
+ todo
98
+
99
+ watch(filename[, options]) =
100
+ todo
tooling/tree-sitter-plum/readme.md CHANGED
@@ -1,9 +1,9 @@
1
- # tree-sitter-kestrel
1
+ # tree-sitter-plum
2
2
 
3
- [![CI](https://github.com/pyrossh/tree-sitter-kestrel/actions/workflows/ci.yml/badge.svg)](https://github.com/pyrossh/tree-sitter-kestrel/actions/workflows/ci.yml)
3
+ [![CI](https://github.com/pyrossh/tree-sitter-plum/actions/workflows/ci.yml/badge.svg)](https://github.com/pyrossh/tree-sitter-plum/actions/workflows/ci.yml)
4
- [![Rust Crate](https://img.shields.io/crates/v/tree-sitter-kestrel.svg)](https://crates.io/crates/tree-sitter-kestrel)
4
+ [![Rust Crate](https://img.shields.io/crates/v/tree-sitter-plum.svg)](https://crates.io/crates/tree-sitter-plum)
5
- [![Node Package](https://img.shields.io/npm/v/tree-sitter-kestrel.svg)](https://www.npmjs.com/package/tree-sitter-kestrel)
5
+ [![Node Package](https://img.shields.io/npm/v/tree-sitter-plum.svg)](https://www.npmjs.com/package/tree-sitter-plum)
6
6
 
7
- 👾 kestrel Programming Language
7
+ 👾 plum Programming Language
8
8
 
9
- Tree sitter grammar for [kestrel programming language](https://github.com/pyrossh/kestrel.sh)
9
+ Tree sitter grammar for [plum programming language](https://github.com/pyrossh/plum.sh)
tooling/vscode-plum/.vscodeignore DELETED
@@ -1,4 +0,0 @@
1
- .vscode/**
2
- .vscode-test/**
3
- .gitignore
4
- vsc-extension-quickstart.md
tooling/vscode-plum/CHANGELOG.md DELETED
@@ -1,9 +0,0 @@
1
- # Change Log
2
-
3
- All notable changes to the "pacos" extension will be documented in this file.
4
-
5
- Check [Keep a Changelog](http://keepachangelog.com/) for recommendations on how to structure this file.
6
-
7
- ## [Unreleased]
8
-
9
- - Initial release
tooling/vscode-plum/readme.md DELETED
@@ -1,69 +0,0 @@
1
- # vscode-kestrel
2
-
3
- 👾 Kestrel Programming Language
4
-
5
- VScode extension for [kestrel programming language](https://github.com/pyrossh/kestrel.sh)
6
-
7
- This is the README for your extension "kestrel". After writing up a brief description, we recommend including the following sections.
8
-
9
- ## Features
10
-
11
- Describe specific features of your extension including screenshots of your extension in action. Image paths are relative to this README file.
12
-
13
- For example if there is an image subfolder under your extension project workspace:
14
-
15
- \!\[feature X\]\(images/feature-x.png\)
16
-
17
- > Tip: Many popular extensions utilize animations. This is an excellent way to show off your extension! We recommend short, focused animations that are easy to follow.
18
-
19
- ## Requirements
20
-
21
- If you have any requirements or dependencies, add a section describing those and how to install and configure them.
22
-
23
- ## Extension Settings
24
-
25
- Include if your extension adds any VS Code settings through the `contributes.configuration` extension point.
26
-
27
- For example:
28
-
29
- This extension contributes the following settings:
30
-
31
- - `myExtension.enable`: Enable/disable this extension.
32
- - `myExtension.thing`: Set to `blah` to do something.
33
-
34
- ## Known Issues
35
-
36
- Calling out known issues can help limit users opening duplicate issues against your extension.
37
-
38
- ## Release Notes
39
-
40
- Users appreciate release notes as you update your extension.
41
-
42
- ### 1.0.0
43
-
44
- Initial release of ...
45
-
46
- ### 1.0.1
47
-
48
- Fixed issue #.
49
-
50
- ### 1.1.0
51
-
52
- Added features X, Y, and Z.
53
-
54
- ---
55
-
56
- ## Working with Markdown
57
-
58
- You can author your README using Visual Studio Code. Here are some useful editor keyboard shortcuts:
59
-
60
- - Split the editor (`Cmd+\` on macOS or `Ctrl+\` on Windows and Linux).
61
- - Toggle preview (`Shift+Cmd+V` on macOS or `Shift+Ctrl+V` on Windows and Linux).
62
- - Press `Ctrl+Space` (Windows, Linux, macOS) to see a list of Markdown snippets.
63
-
64
- ## For more information
65
-
66
- - [Visual Studio Code's Markdown Support](http://code.visualstudio.com/docs/languages/markdown)
67
- - [Markdown Syntax Reference](https://help.github.com/articles/markdown-basics/)
68
-
69
- **Enjoy!**
tooling/vscode-plum/syntaxes/plum.tmLanguage.json CHANGED
@@ -26,7 +26,7 @@
26
26
  "patterns": [
27
27
  {
28
28
  "name": "keyword.control.plum",
29
- "match": "\\b(return|continue|break|match|if|else|while|for|module|as|is|import|assert|todo|crash)\\b"
29
+ "match": "\\b(do|in|this|return|continue|break|match|if|else|while|for|module|as|is|import|assert|todo|crash)\\b"
30
30
  },
31
31
  {
32
32
  "name": "keyword.operator.arrow.plum",
tooling/vscode-plum/vsc-extension-quickstart.md DELETED
@@ -1,29 +0,0 @@
1
- # Welcome to your VS Code Extension
2
-
3
- ## What's in the folder
4
-
5
- * This folder contains all of the files necessary for your extension.
6
- * `package.json` - this is the manifest file in which you declare your language support and define the location of the grammar file that has been copied into your extension.
7
- * `syntaxes/pacos.tmLanguage.json` - this is the Text mate grammar file that is used for tokenization.
8
- * `language-configuration.json` - this is the language configuration, defining the tokens that are used for comments and brackets.
9
-
10
- ## Get up and running straight away
11
-
12
- * Make sure the language configuration settings in `language-configuration.json` are accurate.
13
- * Press `F5` to open a new window with your extension loaded.
14
- * Create a new file with a file name suffix matching your language.
15
- * Verify that syntax highlighting works and that the language configuration settings are working.
16
-
17
- ## Make changes
18
-
19
- * You can relaunch the extension from the debug toolbar after making changes to the files listed above.
20
- * You can also reload (`Ctrl+R` or `Cmd+R` on Mac) the VS Code window with your extension to load your changes.
21
-
22
- ## Add more language features
23
-
24
- * To add features such as IntelliSense, hovers and validators check out the VS Code extenders documentation at https://code.visualstudio.com/docs
25
-
26
- ## Install your extension
27
-
28
- * To start using your extension with Visual Studio Code copy it into the `<user home>/.vscode/extensions` folder and restart Code.
29
- * To share your extension with the world, read on https://code.visualstudio.com/docs about publishing an extension.