-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Closed
Labels
Description
Improved support for Xcode via a new version of file: go/misc/xcode/go.xclangspec What steps will reproduce the problem? 1. Use Xcode to edit/view Go source files. 2. raw strings are not parsed correctly by Xcode, e.g.go/src/pkg/go/scanner/scanner.go 3. type and function definitions do not appear in the pop up menu. What is the expected output? What do you see instead? Xcode does not highlight quotes in raw strings correctly. Xcode does not put top level declarations in the pop up menu. What is your $GOOS? $GOARCH? darwin amd64 Xcode 3.2.1 Which revision are you using? (hg identify) a6fcf4303b0a release/release.2009-12-22 Please provide any additional information below. I've made the following changes to go/misc/xcode/go.xclangspec Item 0. Added "." as an identifier character, to support qualified names. (Cleaner fix might be to define qualified.go.identifier, etc.) Item 1. Added "*" and "," as Interesting.Operators. Needed to parse pointer types and parameter lists. Item 2. (New) Added a definition for xcode.lang.go.rawstring This fixes the highlighting problem. Item 4. Added xcode.lang.go.rawstring to IncludeRules for xcode.lang.go.lexer Item 5. Added xcode.lang.go.method.declaration and xcode.lang.go.function.declaration to the Rules for xcode.lang.go.lexer.toplevel Item 6. (New) Added a definition for xcode.lang.go.method.declaration Item 7. Changed the Type of xcode.lang.go.type.declaration to xcode.syntax.typedef Item 8. (New) Added a definition for xcode.lang.go.function.declaration These two changes allow methods, types, and functions to appear in the pop up menu. Item 10. Added xcode.lang.go.block to the IncludeRules for xcode.lang.go.parenexpr This allows the parsing of interface types in parameter lists. I did not attempt to handle const or groups of definitions; or make a more complete attempt to describe the Go language. Ken
Attachments:
- go.xclangspec (5585 bytes)