summaryrefslogtreecommitdiff
path: root/misc/xcode
diff options
context:
space:
mode:
authorKen Friedenbach <kenliz@cruzio.com>2009-12-29 14:43:54 -0800
committerKen Friedenbach <kenliz@cruzio.com>2009-12-29 14:43:54 -0800
commit2bfb90214a9130b7542155b1900020d416554f7c (patch)
tree72a36ec3edcefeb7a8af7e3652e4958ce32bc511 /misc/xcode
parent47882eb48415d51281928ee2d057e30f0e04a7ee (diff)
downloadgo-2bfb90214a9130b7542155b1900020d416554f7c.tar.gz
Improved Xcode support
Added definition for raw string. Added definitions for function and method declarations. Enabled function, method, and type declarations to appear in Editor pop up menu. Fixes Issue 466. R=golang-dev, gri CC=golang-dev http://codereview.appspot.com/183065 Committer: Robert Griesemer <gri@golang.org>
Diffstat (limited to 'misc/xcode')
-rw-r--r--misc/xcode/go.xclangspec45
1 files changed, 43 insertions, 2 deletions
diff --git a/misc/xcode/go.xclangspec b/misc/xcode/go.xclangspec
index 40fe4f5ab..11b46c47b 100644
--- a/misc/xcode/go.xclangspec
+++ b/misc/xcode/go.xclangspec
@@ -76,12 +76,22 @@
Words = (
"...",
".",
+ "*",
+ ",",
":",
);
Type = "xcode.syntax.plain";
};
},
+ {
+ Identifier = "xcode.lang.go.rawstring";
+ Syntax = {
+ Start = "`";
+ End = "`";
+ Type = "xcode.syntax.string";
+ };
+ },
// ----------------------------------------------------------------------------
// Syntax Coloring
@@ -112,6 +122,7 @@
"xcode.lang.go.comment.singleline",
"xcode.lang.string",
"xcode.lang.character",
+ "xcode.lang.go.rawstring",
"xcode.lang.go.identifier",
"xcode.lang.number",
"xcode.lang.go.interestingOperators",
@@ -127,7 +138,10 @@
"xcode.lang.go.comment.singleline",
"xcode.lang.string",
"xcode.lang.character",
+ "xcode.lang.go.rawstring",
"xcode.lang.go.type.declaration",
+ "xcode.lang.go.method.declaration",
+ "xcode.lang.go.function.declaration",
"xcode.lang.go.identifier",
"xcode.lang.number",
);
@@ -135,6 +149,20 @@
},
{
+ Identifier = "xcode.lang.go.method.declaration";
+ Syntax = {
+ Tokenizer = "xcode.lang.go.lexer";
+ Rules = (
+ "func",
+ "xcode.lang.go.parenexpr",
+ "xcode.lang.go.identifier",
+ "xcode.lang.go.parenexpr",
+ );
+ Type = "xcode.syntax.declaration.method";
+ };
+ },
+
+ {
Identifier = "xcode.lang.go.type.declaration";
Syntax = {
Tokenizer = "xcode.lang.go.lexer";
@@ -142,15 +170,27 @@
"type",
"xcode.lang.go.identifier",
);
- Type = "xcode.syntax.name.partial";
+ Type = "xcode.syntax.typedef";
};
},
+ {
+ Identifier = "xcode.lang.go.function.declaration";
+ Syntax = {
+ Tokenizer = "xcode.lang.go.lexer";
+ Rules = (
+ "func",
+ "xcode.lang.go.identifier",
+ "xcode.lang.go.parenexpr",
+ );
+ Type = "xcode.syntax.declaration.function";
+ };
+ },
// ----------------------------------------------------------------------------
// Blocks
- {
+ {
Identifier = "xcode.lang.go.block";
Syntax = {
Tokenizer = "xcode.lang.go.lexer";
@@ -174,6 +214,7 @@
Recursive = YES;
IncludeRules = (
"xcode.lang.go.bracketexpr",
+ "xcode.lang.go.block",
);
};
},