lib/rouge/lexers/julia.rb in rouge-3.1.1 vs lib/rouge/lexers/julia.rb in rouge-3.2.0

- old
+ new

@@ -13,46 +13,39 @@ def self.detect?(text) return true if text.shebang? 'julia' end BUILTINS = /\b(?: - applicable | assert | convert - | dlopen | dlsym | edit - | eps | error | exit - | finalizer | hash | im - | Inf | invoke | is - | isa | isequal | load - | method_exists | Nan | new - | ntuple | pi | promote - | promote_type | realmax | realmin - | sizeof | subtype | system - | throw | tuple | typemax - | typemin | typeof | uid - | whos + true | false | missing | nothing + | Inf | Inf16 | Inf32 | Inf64 + | NaN | NaN16 | NaN32 | NaN64 + | stdout | stderr | stdin | devnull + | pi | π | ℯ | im )\b/x KEYWORDS = /\b(?: function | return | module | import | export | if | else | elseif | end | for - | in | while | try | catch | super - | const + | in | isa | while | try | catch + | const | local | global | using | struct + | mutable struct | abstract type | finally + | begin | do | quote | macro | for outer )\b/x TYPES = /\b(?: Int | UInt | Int8 | UInt8 | Int16 | UInt16 | Int32 | UInt32 | Int64 | UInt64 | Int128 | UInt128 | Float16 | Float32 | Float64 - | Bool | Inf | Inf16 - | Inf32 | NaN | NaN16 - | NaN32 | BigInt | BigFloat - | Char | ASCIIString | UTF8String - | UTF16String | UTF32String | AbstractString - | WString | String | Regex - | RegexMatch | Complex64 | Complex128 - | Any | Nothing | None + | Bool | BigInt | BigFloat + | Complex | ComplexF16 | ComplexF32 + | ComplexF64 | Missing | Nothing + | Char | String | SubString + | Regex | RegexMatch | Any + | Type | DataType | UnionAll + | (Abstract)?(Array|Vector|Matrix|VecOrMat) )\b/x OPERATORS = / \+ | = | - | \* | \/ | \\ | & | \| | \$ | ~ | \^ | % | ! | >>> | >> @@ -61,13 +54,14 @@ | \^= | &= | \|= | \$= | >>>= | >>= | <<= | == | != | ≠ | <= | ≤ | >= | ≥ | \. | :: | <: | -> | \? | \.\* | \.\^ | \.\\ | \.\/ | \\ | < - | > + | > | ÷ | >: | : | === + | !== /x - PUNCTUATION = / [ \[ \] { } : \( \) , ; @ ] /x + PUNCTUATION = / [ \[ \] { } \( \) , ; @ ] /x state :root do rule /\n/, Text rule /[^\S\n]+/, Text