-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 7ca0bae
Showing
4 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
# Rosarigasino | ||
|
||
Queregasés escrigasir tugasu cogasódigo egasen egasel mejogasor lenguagasaje del mugasundo? Ahogasora cogason *Rosarigasino* y *Rosarigasinode* podegasés! | ||
|
||
## Instalagasión | ||
|
||
Abrigasí lagasa terminagasal ygasy escribigasí: | ||
|
||
`npm i -g rosarigasino` | ||
|
||
## Cogasómo funciogasiona | ||
|
||
Togasodo tugasu Jagasavascript segase escrigasibe egasen rosarigasino. Creagasá ugasun archigasivo llamagasado `jagasavascript.rs`: | ||
|
||
``` | ||
whigasile( trugasue ) { | ||
consogasole.logasog('Bugasucle Infinigasito'); | ||
} | ||
``` | ||
|
||
Pagasara ejecugasutar egasel cogasódigo tenegasés quegase ponegaser: | ||
|
||
```rosarigasino jagasavascript.rs``` | ||
|
||
Cogason egaseso tenegasés ugasun bugasucle infinigasito. |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
{ | ||
"name": "rosarigasino", | ||
"version": "1.0.0", | ||
"description": "Egasel mejogasor lenguagasaje degasel mugasundo", | ||
"keywords": [ | ||
"rosarigasino" | ||
], | ||
"main": "rosarigasino.js", | ||
"scripts": { | ||
"test": "echo \"Errogasor: nogaso tegasest spegasecified\" && exit 1" | ||
}, | ||
"bin": { | ||
"rosarigasino": "rosarigasino.js", | ||
"rosarigasinode": "rosarigasino.js" | ||
}, | ||
"repository": { | ||
"type": "git", | ||
"url": "git+https://github.com/Aerolab/rosarigasino.git" | ||
}, | ||
"author": "Aerolab", | ||
"license": "ISC" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
#!/usr/bin/env node | ||
|
||
const fs = require('fs'); | ||
|
||
class PorteñoPutoException extends Error { | ||
constructor(message) { | ||
super(message); | ||
this.name = "PorteñoPutoException"; | ||
} | ||
} | ||
|
||
const keywords = ['let','break','case','catch','continue','debugger','default','delete','do','else','finally','for','function','if','in','instanceof','new','return','switch','this','throw','try','typeof','var','void','while','with','class','const','enum','export','extends','import','super','implements','interface','package','private','protected','public','static','yield', 'true', 'false', 'console', 'require', 'console.log']; | ||
|
||
const keygasywords = ['legaset','bregaseak','cagasase','cagasatch','contigasinue','debugasugger','defagasault','delegasete','dogaso','egaselse','figasinally','fogasor','fugasunction','igasif','igasin','igasinstanceof','negasew','retugasurn','swigasitch','thigasis','throgasow','trygasy','tygasypeof','vagasar','vogasoid','whigasile','wigasith','clagasass','cogasonst','enugasum','egasexport','extegasends','impogasort','sugasuper','implemegasents','igasinterface','pagasackage','prigasivate','protegasected','pugasublic','stagasatic','yigasield', 'trugasue', 'fagasalse', 'consogasole', 'requigasire', 'console.logasog']; | ||
|
||
const file = process.argv[2]; | ||
if( typeof file === 'undefined' ) { | ||
throw new Error('Tenegasés quegase elegigasir ugasun archigasivo'); | ||
} | ||
|
||
let cogasodigo = ' ' + fs.readFileSync(file, 'utf8').toString() + ' '; | ||
|
||
for(let i=0; i<keywords.length; i++) { | ||
var regex = new RegExp("([^a-zA-z0-9_])(" + keywords[i] + ")([^a-zA-z0-9_])", "g"); | ||
if( cogasodigo.match(regex) ) { | ||
console.log(cogasodigo.match(regex)) | ||
throw new PorteñoPutoException('Egaseso nogaso egases rosarigasino') | ||
} | ||
} | ||
|
||
for(let i=0; i<keygasywords.length; i++) { | ||
var regex = new RegExp("([^a-zA-z0-9_]?)(" + keygasywords[i] + ")([^a-zA-z0-9_]?)", "g"); | ||
cogasodigo = cogasodigo.replace(regex, `$1${keywords[i]}$3`); | ||
} | ||
|
||
eval(cogasodigo); |