mirror of
https://github.com/golang/go
synced 2024-11-22 02:34:40 -07:00
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 #466. R=golang-dev, gri CC=golang-dev https://golang.org/cl/183065
This commit is contained in:
parent
09a930c091
commit
c7e2970ba8
@ -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,13 +138,30 @@
|
||||
"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",
|
||||
);
|
||||
};
|
||||
},
|
||||
|
||||
{
|
||||
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 = {
|
||||
@ -142,10 +170,22 @@
|
||||
"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
|
||||
@ -174,6 +214,7 @@
|
||||
Recursive = YES;
|
||||
IncludeRules = (
|
||||
"xcode.lang.go.bracketexpr",
|
||||
"xcode.lang.go.block",
|
||||
);
|
||||
};
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user