Skip to content

Commit

Permalink
add files
Browse files Browse the repository at this point in the history
  • Loading branch information
robinson committed Sep 14, 2016
0 parents commit 6351591
Show file tree
Hide file tree
Showing 6 changed files with 251 additions and 0 deletions.
15 changes: 15 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
![AtomPlugin](https://github.com/primitivorm/latino/raw/master/AtomPlugin/screenshot.png "AtomPlugin")

## Como instalar

1. Copiar éste directorio al directorio de instalación de **ATOM** `` Atom >> packages ``
3. Reiniciar `Ctlr + Alt + R`

## Activación

1. Abrir **Atom**
3. Menu **Preferences** >> **Install** >> `"Packages are published to atom.io and are installed to /home/..."`

Ejemplo: `"Packages are published to atom.io and are installed to /home/root/.atom/packages"`

El directorio será `/home/root/.atom/packages`
171 changes: 171 additions & 0 deletions grammars/lat.cson
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
'scopeName': 'source.lat'
'name': 'latino'
'comment': 'latino syntax: version 0.1'
'fileTypes': [
'lat'
]
'firstLineMatch': '^#!.*\\blat'
'patterns': [
{
'comment': 'Comentarios'
'name': 'comment.line.number-sign.lat'
'match': '(#).*$\n?'
'captures': {
'1': {
'name': 'comment.line.number-sign.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'
}
}
}
{
'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|falso)\\b'
'captures': {
'1': {
'name': 'constant.language.lat'
}
}
}
{
'comment': 'Sentencias de control'
'name': 'keyword.control.lat'
'match': '\\b(si|sino|fin|mientras|desde|hasta|elegir|caso|defecto|hacer|cuando|retorno|romper|defecto|salto)\\b'
'captures': {
'1': {
'name': 'keyword.control.lat'
}
}
}
{
'comment': 'Tipo de datos'
'name': 'meta.type.lat'
'match': '\\b(logico|entero|decimal|caracter|cadena)'
'captures': {
'1': {
'name': 'support.type.lat'
}
}
}
{
'comment': 'Operadores'
'name': 'meta.type.lat'
'match': '(\\+|\-|\\*|\\/|\%|\&|(?:==)|(?:\:)|(?:!=)|(?:>=)|(?:<=)|\<|\>|\=|\.|\|)'
'captures': {
'1': {
'name': 'keyword.operator.lat'
}
}
}
{
'comment': 'Clases'
'name': 'meta.class.lat',
'match': '(clase)'
'captures': {
'1': {
'name': 'storage.type.class.lat'
}
}
}
{
'comment': 'Clases Propiedades'
'name': 'meta.class.lat',
'match': '(propiedad|constructor|esta)'
'captures': {
'1': {
'name': 'storage.modifier.lat'
}
}
}
{
'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': '([a-zA-Z]+[a-zA-Z0-9_]), (?=logico|entero|decimal|caracter|cadena)'
'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'
}
}
}
]
17 changes: 17 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{
"name": "language-latino",
"version": "0.0.1",
"private": false,
"description": "LatinoPlugin para Atom",
"license": "MIT",
"engines": {
"atom": ">=1.0.0"
},
"dependencies": {},
"readme": "",
"readmeFilename": "README.md",
"bugs": {
"url": "https://github.com/primitivorm/latino/issues"
},
"homepage": "https://github.com/primitivorm/latino"
}
Binary file added screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
5 changes: 5 additions & 0 deletions settings/language-lat.cson
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
'.source.lat':
'editor':
'commentStart': '# '
'increaseIndentPattern': '\\b((si|sino|fin)|(mientras|desde|hasta|elegir|caso|defecto|hacer|cuando|retorno|romper|defecto|salto)|(funcion)|)\\b((?!fin).)*$'
"decreaseIndentPattern": "^\\s*(\\}|\\])\\s*$"
43 changes: 43 additions & 0 deletions snippets/language-lat.cson
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
'.source.lat':
'escribir':
'prefix': 'esc'
'body': 'escribir("${0:...}"})'
'si':
'prefix': 'si'
'body': 'si(${0:verdadero})\n\tescribir("${1:...}")\nfin'
'si-sino':
'prefix': 'sino'
'body': 'si(${0:verdadero})\n\tescribir("${1:...}")\nsino\n\tescribir("${2:...}")\nfin'
'mientras':
'prefix': 'mie'
'body': 'mientras (i < ${0:10})\n\tescribir("${1:...}")\nfin'
'hacer':
'prefix': 'hac'
'body': 'hacer\n\tescribir(i)\n\ti++\ncuando (i < ${0:10})'
'elegir':
'prefix': 'ele'
'body': 'elegir(${0:str})\nfin'
'caso':
'prefix': 'cas'
'body': "caso '${0:x}':"
'desde':
'prefix': 'des'
'body': 'desde(i=0; i<${0:10}; i++)\n\tescribir(i)\nfin'
'funcion':
'prefix': 'fun'
'body': 'funcion ${0:name}(s)\n\tretorno s\nfin'
'leer teclado':
'prefix': 'leer'
'body': 'entrada = leer()'
'ejecutar archivo':
'prefix': 'ejea'
'body': 'ejecutar_archivo("${0:name}.lat")'
'leer archivo':
'prefix': 'leer'
'body': 'leer_archivo("${0:name}.txt")'
'escribir archivo':
'prefix': 'esca'
'body': 'escribir_archivo("${0:name}.txt", s)'
'ejecutar comando':
'prefix': 'ejec'
'body': 'sistema(${0:date})'

0 comments on commit 6351591

Please sign in to comment.