From: Brendan Hansen Date: Sat, 3 Oct 2020 05:10:53 +0000 (-0500) Subject: small updates to sublime syntax X-Git-Url: https://git.brendanfh.com/?a=commitdiff_plain;h=7ec87aadbe3d6583863e69e9e3c33ef81f67b9a4;p=onyx.git small updates to sublime syntax --- diff --git a/docs/spec b/docs/spec index 8d3c2b23..41a1dbf9 100644 --- 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. diff --git a/misc/onyx.sublime-syntax b/misc/onyx.sublime-syntax index e399078c..20fe6be3 100644 --- a/misc/onyx.sublime-syntax +++ b/misc/onyx.sublime-syntax @@ -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 3e0aae99..59f54e4c 100755 Binary files a/onyx and b/onyx differ