forked from lenguaje-latino/latino-sublimetext-plugin
-
Notifications
You must be signed in to change notification settings - Fork 0
/
LATINO.YAML-tmLanguage
134 lines (115 loc) · 3.39 KB
/
LATINO.YAML-tmLanguage
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
# [PackageDev] target_format: plist, ext: tmLanguage
---
name: Latino
scopeName: source.lat
fileTypes: [lat]
uuid: c7474ef1-5518-47f6-aa31-97ca8bd9cc60
patterns:
# INICIO COMENTARIOS Y COMILLAS
- comment: Comentarios
name: comment.line.number-sign.lat
match: (#).*$\n?
captures:
"1": {name: comment.line.number-sign.lat }
- comment: Comentarios
name: comment.line.number-sign.lat
match: (\//).*$\n?
captures:
"1": {name: comment.line.number-sign.lat }
- comment: Comentarios
name: comment.block.begin.latino
begin: "/\\*"
captures:
"1": {name: comment.block.begin.lat }
name: comment.block.end.latino
end: "\\*/"
captures:
"1": {name: comment.block.end.lat }
- comment: Comillas
name: string.quoted.double.lat
begin: '"'
end: '"'
captures:
'1': {name: string.quoted.double.lat}
- comment: Comillas
name: string.quoted.single.lat
begin: "'"
end: "'"
captures:
'1': {name: string.quoted.single.lat}
# INICIO CONSTANTES
- comment: Constantes
name: support.constant.lat
match: '\b([A-Z]|[A-Z] )+\b'
captures:
'1': {name: support.constant.lat}
- comment: Constantes Numericas. LOS NUMEROS
name: constant.numeric.lat
match: '\b(\d+)\b'
captures:
'1': {name: support.other.lat}
- comment: Constantes Logicas
name: constant.language.lat
match: '\b(verdadero|cierto|falso)\b'
captures:
'1': {name: constant.language.lat}
# INICIO SENTENCIAS DE CONTROL
- comment: Sentencias de control
name: keyword.control.lat
match: '\b(si|sino|fin|mientras|desde|hasta|elegir|caso|defecto|hacer|cuando|retorno|defecto)\b'
captures:
'1': {name: keyword.control.lat}
# INICIO TIPOS DE DATOS Y OPERADORES
- comment: Tipo de datos
name: meta.type.lat
match: '\b(logico|numerico|cadena)'
captures:
'1': {name: support.type.lat}
- comment: Operadores
name: meta.type.lat
match: '(\+|\-|\*|\/|\%|\&|(?:==)|(?:\:)|(?:!=)|(?:>=)|(?:<=)|\<|\>|\=|\.|\|)'
captures:
'1': {name: keyword.operator.lat}
# INICIO CLASES
- comment: Clases
name: meta.class.lat #entity.type.class.lat
match: '(clase)'
captures:
'1': {name: storage.type.class.lat}
- comment: Clases Propiedades
name: meta.class.lat #meta.property-name.lat
match: '(propiedad|constructor|esta)'
captures:
'1': {name: storage.modifier.lat} #storage.modifier.lat
# INICIO FUNCIONES
- comment: Funcion
name: meta.function.lat
match: '(funcion)'
captures:
'1': {name: storage.type.function.lat}
- comment: Funciones Nombres
name: meta.function.lat
match: '([a-zA-Z_][a-zA-Z0-9_]*)+( )*\(+' #'([a-zA-Z][a-zA-Z0-9_]*)\(+'
captures:
'1': {name: entity.name.function.lat}
- comment: Funciones Parametros Varios
name: meta.function.lat
match: '\b([a-zA-Z_][a-zA-Z_0-9]*)\s*(?:(,)|(?=[\n\)]))'
captures:
'1': {name: variable.parameter.function.lat}
- comment: Funciones Parametro Unico
name: meta.function.lat
match: '([a-zA-Z][a-zA-Z0-9_]*)\)'
captures:
'1': {name: variable.parameter.function.lat}
- comment: Funciones Parametro Unico Letra
name: meta.function.lat
match: '([a-zA-Z])\)'
captures:
'1': {name: variable.parameter.function.lat}
- comment: Funciones Llamada
name: meta.function-call.lat
match: '(?i:(?!\$[a-z_][a-z0-9_]*->)([a-z_][a-z_0-9]*)\s*\()'
captures:
'1': {name: meta.function-call.lat}
...