Skip to content

Commit dfee4da

Browse files
committed
Update vsc extension for moved stdlib functions in to native
1 parent 9a66b1d commit dfee4da

7 files changed

Lines changed: 41 additions & 2 deletions

File tree

vsc/hovers/isBool.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Returns if value is a bool or not.
2+
3+
```clox
4+
print isBool(false); // true
5+
print isBool(123); // false
6+
```

vsc/hovers/isFunction.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
Returns if value is a function or not.
2+
3+
```clox
4+
fun sum(a, b) = a + b;
5+
6+
print isFunction(ceil); // true
7+
print isFunction(sum); // true
8+
print isFunction(123); // false
9+
```

vsc/hovers/isNil.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Returns if value is a nil or not.
2+
3+
```clox
4+
print isNil(nil); // true
5+
print isNil(123); // false
6+
```

vsc/hovers/isNumber.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Returns if value is a number or not.
2+
3+
```clox
4+
print isNumber(123); // true
5+
print isNumber("Hello World"); // false
6+
```

vsc/hovers/isString.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Returns if value is a string or not.
2+
3+
```clox
4+
print isString("Hello World"); // true
5+
print isString(123); // false
6+
```

vsc/hovers/strIsEmpty.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
Returns if a string's length is zero or not.
2+
3+
```clox
4+
print strIsEmpty(""); // true
5+
print strIsEmpty("Hello World"); // false
6+
```

vsc/syntaxes/clox.tmLanguage.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
"match": "\\b(clock|len|argv|argc|typeof|rand|rand01|randBetween|ceil|readFileToString|writeStringToFile|fileExists|getenv|setenv|__version__|exit|instanceOf|prompt|stdin|parseNumber|numberToString|arrPush|arrPop|arrInsert|arrRemove|arrClear|arrContains|arrCopy|arrEqual|arrIsEmpty|arrSlice|arrConcat|arrReverse)\\b"
1111
},
1212
{
13-
"name": "entity.name.function.stdlib.clox",
14-
"match": "\\b(is|is_number|is_string|is_nil|is_function|is_bool|is_empty)\\b"
13+
"name": "entity.name.function.native.clox",
14+
"match": "\\b(is|isNumber|isString|isNil|isFunction|isBool|strIsEmpty)\\b"
1515
},
1616
{
1717
"name": "entity.name.function.method.clox",

0 commit comments

Comments
 (0)