Skip to content

Commit 6351591

Browse files
author
robinson
committed
add files
0 parents  commit 6351591

File tree

6 files changed

+251
-0
lines changed

6 files changed

+251
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
![AtomPlugin](https://github.com/primitivorm/latino/raw/master/AtomPlugin/screenshot.png "AtomPlugin")
2+
3+
## Como instalar
4+
5+
1. Copiar éste directorio al directorio de instalación de **ATOM** `` Atom >> packages ``
6+
3. Reiniciar `Ctlr + Alt + R`
7+
8+
## Activación
9+
10+
1. Abrir **Atom**
11+
3. Menu **Preferences** >> **Install** >> `"Packages are published to atom.io and are installed to /home/..."`
12+
13+
Ejemplo: `"Packages are published to atom.io and are installed to /home/root/.atom/packages"`
14+
15+
El directorio será `/home/root/.atom/packages`

grammars/lat.cson

Lines changed: 171 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,171 @@
1+
'scopeName': 'source.lat'
2+
'name': 'latino'
3+
'comment': 'latino syntax: version 0.1'
4+
'fileTypes': [
5+
'lat'
6+
]
7+
'firstLineMatch': '^#!.*\\blat'
8+
'patterns': [
9+
{
10+
'comment': 'Comentarios'
11+
'name': 'comment.line.number-sign.lat'
12+
'match': '(#).*$\n?'
13+
'captures': {
14+
'1': {
15+
'name': 'comment.line.number-sign.lat'
16+
}
17+
}
18+
}
19+
{
20+
'comment': 'Comillas'
21+
'name': 'string.quoted.double.lat'
22+
'begin': '"'
23+
'end': '"'
24+
'captures': {
25+
'1': {
26+
'name': 'string.quoted.double.lat'
27+
}
28+
}
29+
}
30+
{
31+
'comment': 'Comillas'
32+
'name': 'string.quoted.single.lat'
33+
'begin': "'",
34+
'end': "'",
35+
'captures': {
36+
'1': {
37+
'name': 'string.quoted.single.lat'
38+
}
39+
}
40+
}
41+
{
42+
'comment': 'Constantes'
43+
'name': 'support.constant.lat'
44+
'match': '\\b([A-Z]|[A-Z] )+\\b'
45+
'captures': {
46+
'1': {
47+
'name': 'support.constant.lat'
48+
}
49+
}
50+
}
51+
{
52+
'comment': 'Constantes Numericas. LOS NUMEROS'
53+
'name': 'constant.numeric.lat'
54+
'match':'\\b(\d+)\\b'
55+
'captures': {
56+
'1': {
57+
'name': 'support.other.lat'
58+
}
59+
}
60+
}
61+
{
62+
'comment': 'Constantes Logicas'
63+
'name': 'constant.language.lat'
64+
'match':'\\b(verdadero|falso)\\b'
65+
'captures': {
66+
'1': {
67+
'name': 'constant.language.lat'
68+
}
69+
}
70+
}
71+
{
72+
'comment': 'Sentencias de control'
73+
'name': 'keyword.control.lat'
74+
'match': '\\b(si|sino|fin|mientras|desde|hasta|elegir|caso|defecto|hacer|cuando|retorno|romper|defecto|salto)\\b'
75+
'captures': {
76+
'1': {
77+
'name': 'keyword.control.lat'
78+
}
79+
}
80+
}
81+
{
82+
'comment': 'Tipo de datos'
83+
'name': 'meta.type.lat'
84+
'match': '\\b(logico|entero|decimal|caracter|cadena)'
85+
'captures': {
86+
'1': {
87+
'name': 'support.type.lat'
88+
}
89+
}
90+
}
91+
{
92+
'comment': 'Operadores'
93+
'name': 'meta.type.lat'
94+
'match': '(\\+|\-|\\*|\\/|\%|\&|(?:==)|(?:\:)|(?:!=)|(?:>=)|(?:<=)|\<|\>|\=|\.|\|)'
95+
'captures': {
96+
'1': {
97+
'name': 'keyword.operator.lat'
98+
}
99+
}
100+
}
101+
{
102+
'comment': 'Clases'
103+
'name': 'meta.class.lat',
104+
'match': '(clase)'
105+
'captures': {
106+
'1': {
107+
'name': 'storage.type.class.lat'
108+
}
109+
}
110+
}
111+
{
112+
'comment': 'Clases Propiedades'
113+
'name': 'meta.class.lat',
114+
'match': '(propiedad|constructor|esta)'
115+
'captures': {
116+
'1': {
117+
'name': 'storage.modifier.lat'
118+
}
119+
}
120+
}
121+
{
122+
'comment': 'Funcion'
123+
'name': 'meta.function.lat'
124+
'match': '^(funcion)'
125+
'captures': {
126+
'1': {
127+
'name': 'storage.type.function.lat'
128+
}
129+
}
130+
}
131+
{
132+
'comment': 'Funciones Nombres'
133+
'name': 'meta.function.lat'
134+
'match': '([a-zA-Z]+[a-zA-Z0-9_]|[a-zA-Z]+[a-zA-Z0-9_] ) +',
135+
'captures': {
136+
'1': {
137+
'name': 'entity.name.function.lat'
138+
}
139+
}
140+
}
141+
{
142+
'comment': 'Funciones Parametros Varios'
143+
'name': 'meta.function.lat'
144+
'match': '([a-zA-Z]+[a-zA-Z0-9_]), (?=logico|entero|decimal|caracter|cadena)'
145+
'captures': {
146+
'1': {
147+
'name': 'variable.parameter.function.lat'
148+
}
149+
}
150+
}
151+
{
152+
'comment': 'Funciones Parametro Unico'
153+
'name': 'meta.function.lat'
154+
'match': '([a-zA-Z]+[a-zA-Z0-9_])'
155+
'captures': {
156+
'1': {
157+
'name': 'variable.parameter.function.lat'
158+
}
159+
}
160+
}
161+
{
162+
'comment': 'Funciones Parametro Unico Letra'
163+
'name': 'meta.function.lat'
164+
'match': '([a-zA-Z])'
165+
'captures': {
166+
'1': {
167+
'name': 'variable.parameter.function.lat'
168+
}
169+
}
170+
}
171+
]

package.json

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
{
2+
"name": "language-latino",
3+
"version": "0.0.1",
4+
"private": false,
5+
"description": "LatinoPlugin para Atom",
6+
"license": "MIT",
7+
"engines": {
8+
"atom": ">=1.0.0"
9+
},
10+
"dependencies": {},
11+
"readme": "",
12+
"readmeFilename": "README.md",
13+
"bugs": {
14+
"url": "https://github.com/primitivorm/latino/issues"
15+
},
16+
"homepage": "https://github.com/primitivorm/latino"
17+
}

screenshot.png

135 KB
Loading

settings/language-lat.cson

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
'.source.lat':
2+
'editor':
3+
'commentStart': '# '
4+
'increaseIndentPattern': '\\b((si|sino|fin)|(mientras|desde|hasta|elegir|caso|defecto|hacer|cuando|retorno|romper|defecto|salto)|(funcion)|)\\b((?!fin).)*$'
5+
"decreaseIndentPattern": "^\\s*(\\}|\\])\\s*$"

snippets/language-lat.cson

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
'.source.lat':
2+
'escribir':
3+
'prefix': 'esc'
4+
'body': 'escribir("${0:...}"})'
5+
'si':
6+
'prefix': 'si'
7+
'body': 'si(${0:verdadero})\n\tescribir("${1:...}")\nfin'
8+
'si-sino':
9+
'prefix': 'sino'
10+
'body': 'si(${0:verdadero})\n\tescribir("${1:...}")\nsino\n\tescribir("${2:...}")\nfin'
11+
'mientras':
12+
'prefix': 'mie'
13+
'body': 'mientras (i < ${0:10})\n\tescribir("${1:...}")\nfin'
14+
'hacer':
15+
'prefix': 'hac'
16+
'body': 'hacer\n\tescribir(i)\n\ti++\ncuando (i < ${0:10})'
17+
'elegir':
18+
'prefix': 'ele'
19+
'body': 'elegir(${0:str})\nfin'
20+
'caso':
21+
'prefix': 'cas'
22+
'body': "caso '${0:x}':"
23+
'desde':
24+
'prefix': 'des'
25+
'body': 'desde(i=0; i<${0:10}; i++)\n\tescribir(i)\nfin'
26+
'funcion':
27+
'prefix': 'fun'
28+
'body': 'funcion ${0:name}(s)\n\tretorno s\nfin'
29+
'leer teclado':
30+
'prefix': 'leer'
31+
'body': 'entrada = leer()'
32+
'ejecutar archivo':
33+
'prefix': 'ejea'
34+
'body': 'ejecutar_archivo("${0:name}.lat")'
35+
'leer archivo':
36+
'prefix': 'leer'
37+
'body': 'leer_archivo("${0:name}.txt")'
38+
'escribir archivo':
39+
'prefix': 'esca'
40+
'body': 'escribir_archivo("${0:name}.txt", s)'
41+
'ejecutar comando':
42+
'prefix': 'ejec'
43+
'body': 'sistema(${0:date})'

0 commit comments

Comments
 (0)