]> Cypherpunks repositories - gostls13.git/commitdiff
Improved Xcode support
authorKen Friedenbach <kenliz@cruzio.com>
Tue, 29 Dec 2009 22:43:54 +0000 (14:43 -0800)
committerRobert Griesemer <gri@golang.org>
Tue, 29 Dec 2009 22:43:54 +0000 (14:43 -0800)
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

misc/xcode/go.xclangspec

index 40fe4f5ab882aed8f0635d1d1b6c3544ea9cc7fe..11b46c47b24cbb495d55bf237e962b32388ae16f 100644 (file)
                        Words = (
                                "...",
                                ".",
+                               "*",
+                               ",",
                                ":",
                        );
                        Type = "xcode.syntax.plain";
                };
        },
 
+       {
+               Identifier = "xcode.lang.go.rawstring";
+               Syntax = {
+                       Start = "`";
+                       End = "`";
+                       Type = "xcode.syntax.string";
+               };
+       },
 
 // ----------------------------------------------------------------------------
 // Syntax Coloring
                                "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",
                                "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 = {
                                "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";
                        Recursive = YES;
                        IncludeRules = (
                                "xcode.lang.go.bracketexpr",
+                               "xcode.lang.go.block",
                        );
                };
        },