small updates to sublime syntax
authorBrendan Hansen <brendan.f.hansen@gmail.com>
Sat, 3 Oct 2020 05:10:53 +0000 (00:10 -0500)
committerBrendan Hansen <brendan.f.hansen@gmail.com>
Sat, 3 Oct 2020 05:10:53 +0000 (00:10 -0500)
docs/spec
misc/onyx.sublime-syntax
onyx

index 8d3c2b23a26694d95a9d9a32f382037fa0081451..41a1dbf97e2d2717ca00b6745502da2b3dcb888e 100644 (file)
--- a/docs/spec
+++ b/docs/spec
@@ -7,16 +7,21 @@
     of the design and functionality of Onyx is entirely in my head and I am already beginning to forget some
     of the features of the language.
 
-        Some common abbrevations used in this paper:
+                                            How to read this document
+
+        To easily navigate this document, tags have been placed for your editor to easily find. If you see
+    #foo somewhere, you can search for [foo] which will be the place where foo is explained.
+
+                                  Some common abbrevations used in this paper
                                             LHS for "Left Hand Side"
                                             RHS for "Right Hand Side"
 
                                               Language Features
                 Grammar.................................................................Line xxx
-                Operator Precedence.....................................................[op-pred]
+                Operator Precedence.....................................................#op-pred
                 Operators...............................................................Line xxx
                     Arithmetic Operators................................................Line xxx
-                    Logical Operators...................................................[log-ops]
+                    Logical Operators...................................................#log-ops
                     Bitwise Operators...................................................Line xxx
                     Miscellaneous Operators.............................................Line xxx
                 Packages................................................................Line xxx
@@ -37,7 +42,7 @@
                                   | 4 |                 == !=                     |
                                   | 3 |               && || ^^                    |
                                   | 2 |                |> ..                      |
-                                  | 1 |   = += -= *= /= %= &= |= ^= <<= >>= >>>   |
+                                  | 1 |  = += -= *= /= %= &= |= ^= <<= >>= >>>=   |
                                   +---+-------------------------------------------+
 
 
@@ -75,6 +80,6 @@
                                                 ^^       Logical XOR
 
         All logical operators are of equal precedence. && and || are standard operators in many C-style languages.
-    ^^ is not found in any of the languages I know about, but I don't see a reason not to have it. There are a few
-    places in the compiler that could utilize the ^^ operator.
+    ^^ is a boolean XOR operation and is not found in any of the languages I know about, but I don't see a reason
+    not to have it. There are a few places in the compiler that could utilize the ^^ operator.
 
index e399078c694bb1512091d44732d2ee91aa59ad91..20fe6be3c6c121b36e244f18984f998fdf254af2 100644 (file)
@@ -48,6 +48,14 @@ contexts:
     - match: '#[a-zA-Z_]+'
       scope: keyword.other.onyx
 
+    - match: '([a-zA-Z_][a-zA-Z0-9_\.]+)\s*\('
+      captures:
+        1: meta.function-call.onyx
+
+    - match: '([a-zA-Z_][a-zA-Z0-9_]+)\s*:'
+      captures:
+        1: variable
+
   double_quoted_string:
     - meta_scope: string.quoted.double.onyx
     - match: '\\.'
diff --git a/onyx b/onyx
index 3e0aae99d384a217deb2fc83505ee34bc1da4124..59f54e4cacfdfa6df99198957a863f6a1a4ef24c 100755 (executable)
Binary files a/onyx and b/onyx differ