[gtksourceview] go.lang: make "0i" syntax highlight as integer
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceview] go.lang: make "0i" syntax highlight as integer
- Date: Sun, 29 Nov 2020 19:53:54 +0000 (UTC)
commit 576ef39efb983f0fc8da401f9a3879543d223713
Author: Pile Trade <pile trade gmail com>
Date: Tue Nov 17 19:03:11 2020 +0000
go.lang: make "0i" syntax highlight as integer
data/language-specs/go.lang | 2 +-
tests/syntax-highlighting/file.go | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/data/language-specs/go.lang b/data/language-specs/go.lang
index 353181ea..f5666cb3 100644
--- a/data/language-specs/go.lang
+++ b/data/language-specs/go.lang
@@ -142,7 +142,7 @@
</define-regex>
<context id="imaginary" style-ref="imaginary">
- <match>(?<![\w\.])(\%{float}|\%{oct}|\%{bin}|\%{hex}|\[0-9]+)[i]\b</match>
+ <match>(?<![\w\.])(\%{float}|\%{oct}|\%{bin}|\%{hex}|\%{dec})[i]\b</match>
</context>
<context id="float" style-ref="floating-point">
diff --git a/tests/syntax-highlighting/file.go b/tests/syntax-highlighting/file.go
index 3f3c61e5..c044a0e6 100644
--- a/tests/syntax-highlighting/file.go
+++ b/tests/syntax-highlighting/file.go
@@ -6,4 +6,4 @@ var s string = "A string with \x60 a horse \140 \u2014 \U0001F40E %[1]O\n"
var i = 0b0100_0101i
func main() { fmt.Printf(s, 0o_7_7_7); }
type my_struct struct { I int; o string }
-func bar( a int32, b string )(c float32 ){ c = 1.3 + 0x1.fp-2 * float32(a - int32(len(b))); return }
\ No newline at end of file
+func bar( a int32, b string )(c float32) { c = imag(987i) + 1.3 + 0x1.fp-2 * float32(a - int32(len(b)));
return }
\ No newline at end of file
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]