-
Notifications
You must be signed in to change notification settings - Fork 4
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
Sameh Fakoua
committed
Jun 16, 2019
1 parent
c92fb98
commit 743bd0f
Showing
6 changed files
with
97 additions
and
6 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
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
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 |
---|---|---|
@@ -1,17 +1,56 @@ | ||
# Labiba Transformer | ||
|
||
> The Labiba Transformer | ||
> Transform Labiba Syntax into JavaScript | ||
For working IDE see our repository: [labiba](https://github.com/fakoua/labiba) | ||
|
||
## Example: | ||
```sh | ||
const labiba = require('labiba-transformer') | ||
|
||
let labibaCode =` | ||
//Comment | ||
متغير سامح = 1; | ||
مهمة مثل() { | ||
ارجاع 'مرحبا'; | ||
} | ||
مثل() | ||
` | ||
let code = labiba.transform(labibaCode); | ||
|
||
console.log(code) | ||
|
||
------------ | ||
output: | ||
//Comment | ||
|
||
var سامح = 1; | ||
|
||
function مثل() { | ||
return 'مرحبا'; | ||
} | ||
|
||
مثل(); | ||
|
||
``` | ||
|
||
## Install | ||
|
||
Using npm: | ||
|
||
```sh | ||
npm install --save-dev labiba-transformer | ||
npm install labiba-transformer --save-dev | ||
``` | ||
|
||
or using yarn: | ||
|
||
```sh | ||
yarn add labiba-transformer --dev | ||
``` | ||
|
||
## Build | ||
```sh | ||
yarn install | ||
yarn build | ||
``` |
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 |
---|---|---|
@@ -1 +1,7 @@ | ||
"use strict"; | ||
"use strict"; | ||
|
||
var labiba = require('./index'); | ||
|
||
var labibaCode = "\n//Comment\n\u0645\u062A\u063A\u064A\u0631 \u0633\u0627\u0645\u062D = 1;\n\u0645\u0647\u0645\u0629 \u0645\u062B\u0644() {\n \u0627\u0631\u062C\u0627\u0639 '\u0645\u0631\u062D\u0628\u0627';\n}\n\n\u0645\u062B\u0644()\n"; | ||
var code = labiba.transform(labibaCode); | ||
console.log(code); |
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
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,14 @@ | ||
const labiba = require('./index') | ||
|
||
let labibaCode =` | ||
//Comment | ||
متغير سامح = 1; | ||
مهمة مثل() { | ||
ارجاع 'مرحبا'; | ||
} | ||
مثل() | ||
` | ||
let code = labiba.transform(labibaCode); | ||
|
||
console.log(code) |