Przeglądaj źródła

Fix all instances of bool/str => Bool/String

David Peter 2 lat temu
rodzic
commit
6572a27ee0

+ 1 - 1
assets/numbat.sublime-syntax

@@ -7,7 +7,7 @@ file_extensions:
 scope: source.nbt
 contexts:
   main:
-    - match: \b(per|to|let|fn|dimension|unit|use|long|short|both|none|print|assert|assert_eq|type|if|then|else|true|false|bool|str)\b
+    - match: \b(per|to|let|fn|dimension|unit|use|long|short|both|none|print|assert|assert_eq|type|if|then|else|true|false)\b
       scope: keyword.control.nbt
     - match: '#(.*)'
       scope: comment.line.nbt

+ 1 - 1
assets/numbat.vim

@@ -5,7 +5,7 @@ if exists("b:current_syntax")
 endif
 
 " Numbat Keywords
-syn keyword numbatKeywords per to let fn dimension unit use long short both none print assert assert_eq type if then else true false bool str
+syn keyword numbatKeywords per to let fn dimension unit use long short both none print assert assert_eq type if then else true false Bool String
 highlight default link numbatKeywords Keyword
 
 " Physical dimensions (every capitalized word)

+ 1 - 1
book/numbat.js

@@ -4,7 +4,7 @@ hljs.registerLanguage('numbat', function(hljs) {
     aliases: ['nbt'],
     case_insensitive: false,
     keywords: {
-      keyword: 'per to let fn dimension unit use long short both none print assert assert_eq type if then else true false bool str',
+      keyword: 'per to let fn dimension unit use long short both none print assert assert_eq type if then else true false',
     },
     contains: [
       hljs.HASH_COMMENT_MODE,

+ 6 - 6
book/src/list-functions.md

@@ -88,9 +88,9 @@ you also get access to:
 
 ## Strings
 
-* `fn str_length(s: str) -> Scalar`
-* `fn str_slice(s: str, start: Scalar, end: Scalar) -> str`
-* `fn str_append(a: str, b: str) -> str`
-* `fn str_contains(haystack: str, needle: str) -> bool`
-* `fn str_replace(s: str, pattern: str, replacement: str) -> str`
-* `fn str_repeat(a: str, n: Scalar) -> str`
+* `fn str_length(s: String) -> Scalar`
+* `fn str_slice(s: String, start: Scalar, end: Scalar) -> String`
+* `fn str_append(a: String, b: String) -> String`
+* `fn str_contains(haystack: String, needle: String) -> Bool`
+* `fn str_replace(s: String, pattern: String, replacement: String) -> String`
+* `fn str_repeat(a: String, n: Scalar) -> String`

+ 1 - 1
book/src/procedures.md

@@ -68,5 +68,5 @@ You can use the builtin `type` procedure to see the type (or physical dimension)
 
 >>> type(2 < 3)
 
-  bool
+  Bool
 ```

+ 1 - 1
vscode-extension/syntaxes/numbat.tmLanguage.json

@@ -32,7 +32,7 @@
             "patterns": [
                 {
                     "name": "keyword.control.numbat",
-                    "match": "\\b(per|to|let|fn|dimension|unit|use|long|short|both|none|print|assert|assert_eq|type|if|then|else|true|false|bool|str)\\b"
+                    "match": "\\b(per|to|let|fn|dimension|unit|use|long|short|both|none|print|assert|assert_eq|type|if|then|else|true|false)\\b"
                 }
             ]
         },