Skip to content
Open
Show file tree
Hide file tree
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions lang/go/code_keyword.talon-list
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
list: user.code_keyword
code.language: go
-

break: "break"
continue: "continue"
struct: "struct"
type: "type"
return: "return"
package: "package"
import: "import"
null: "nil"
nil: "nil"
true: "true"
false: "false"
defer: "defer"
go: "go"
if: "if"
else: "else"
switch: "switch"
select: "select"
const: "const"
var: "var "
14 changes: 14 additions & 0 deletions lang/go/code_type.talon-list
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
list: self.code_type
code.language: go
-

boolean: "bool"
int: "int"
you int: "uint"
you int pointer: "uintptr"
float thirty two: "float32"
float: "float64"
string: "string"
byte: "byte"
rune: "rune"
channel: "channel"
37 changes: 0 additions & 37 deletions lang/go/go.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,43 +9,6 @@
code.language: go
"""

# Primitive Types
ctx.lists["self.code_type"] = {
"boolean": "bool",
"int": "int",
"float": "float",
"byte": "byte",
"double": "double",
"short": "short",
"long": "long",
"char": "char",
"string": "string",
"rune": "rune",
"void": "void",
"channel": "channel",
}

ctx.lists["user.code_keyword"] = {
"break": "break",
"continue": "continue",
"struct": "struct",
"type": "type",
"return": "return",
"package": "package",
"import": "import",
"null": "nil",
"nil": "nil",
"true": "true",
"false": "false",
"defer": "defer",
"go": "go",
"if": "if",
"else": "else",
"switch": "switch",
"select": "select",
"const": "const",
}

operators = Operators(
# code_operators_array
SUBSCRIPT=create_described_insert_between("[", "]"),
Expand Down
1 change: 1 addition & 0 deletions lang/go/go.talon
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ tag(): user.code_operators_bitwise
tag(): user.code_operators_lambda
tag(): user.code_operators_math
tag(): user.code_operators_pointer
tag(): user.code_keywords

settings():
user.code_private_function_formatter = "PRIVATE_CAMEL_CASE"
Expand Down