!Feazy logo
Description
The main goal of this project is to build a high-level language that makes front-end development more interactive and easiest. This mission consists of producing a context-free grammar on a simple way to get an effortless syntax to learn and code, and implementing the necessary concepts to make an uncomplicated language, with keeping the process of transpilation speedy.
NOTES:
- All Feazy files are saved with (.fz) extension
- Feazy is a case sensitive language
$3
NodeJS, Nearley, JSON, CommanderJS, InquirerJS
How it works?
Feazy transpiler is a CLI application developed simply to use it easily.
Feazy has three commands you can call:
- Create (alias: c)
- Transpile (alias: t)
- Detect (alias: d)
Every command has its own functionality and options.
$3
This command is used to create new Feazy project and initialize environement.
Syntax: "Feazy create" or "Feazy c"Feazy use inquirerJS to make interactive Q&A like:
!
First capture - create!
Second capture - createThis files that will be initialized automatically in your project folder:
!
Third capture - createThis is initialized homepage:
!
Fourth capture - createThis file where you can define globale variables to use many times:
!
Fifth capture - create$3
This command is used to transpile Feazy project to HTML & CSS project.
__
Syntax: "Feazy transpile [options]" or "Feazy t [options]"__
Options:
- Project location ("--in project_dir" or "-i project_dir")
- Live transpilation ("--live interval" or "-l interval") __(Interval per minute)__
__Example: "Feazy t -i project_dir -l 5"__
!First capture - transpile
$3
This command is used to detect Feazy code errors.
__
Syntax: "Feazy detect [options]" or "Feazy d [options]"__
Options:
- Project location ("--in project_dir" or "-i project_dir")
__Example: "Feazy d -i project_dir"__
!First capture - detect
!Second capture - detect
Documentation
Feazy language has their own context-free grammar combined with many production roles that define its syntax and parsing method using nested object written with JSON.
$3
With Feazy, you havn't to declare variable with specific type and use it then! All you need to do is assign to variable directly and use it as a global one
``
@a = 1;
@b = 2;
@c = @b + @a;
`
`
@bg = #FFF;
$body .body{
bg-color= @bg;
};
`
Feazy supports probably all known variable types, such as:
- Integer
- Float
- String
- Boolean
- Character
- Color hex
$3
For easy front-end development, avoid CSS margin and padding problems you can save your values with variables.
Also, you can use operators and expressions!
`
@a = 1 + 1;
@b = 4 - @a;
@c = 2 / @b;
@d = @b * @c;
@e = sin(@d) + cos(@a);
@f = @e * pi;
`
$3
Statements in Feazy are so easy to write and clean to read.
$body: tagname
.body: classname (optional)
content: attribut used to set content
attr:value: operator used between the attribut and value to notice that is a CSS attribut
attr=value: operator used between the attribut and value to notice that is a HTML attribut
Feazy:
`
$body .body{
background: #FFF;
$h1 {
content= "Hello, World!";
};
};
`
Transpiled to:
`html
Hello, World!
`
`css
.body {
background: #FFF;
}
`
$3
Including is one of the important features that will offer distribution and easy project management.
Include is used to reuse a bloc of code many times with writing it only one time.
heading.fz
`
$h1 .h1{
content="Hello, World!";
};
`
`
$body .body{
@include("heading.fz");
};
`
Means:
`
$body .body{
$h1 {
content= "Hello, World!";
};
};
`
$3
Using is a feature that gives the opportunity to developer to declare all global variables in one file
`
@use("strings.fz");
`
strings.fz
`
@name= "Feazy";
@description= "Context-free language";
@ver= 0.1;
`
$3
To make developer feel free and adapt with Feazy this feature is the best.
HTML
`
#HTML
Hello again
#HTML
`
CSS
`
#CSS
.p {
color: #FFF;
}
#CSS
`
PHP
`
#PHP
echo("Hello again");
#PHP
`
JavaScript
`
#JS
alert("Hello again");
#JS
`
$3
As any another language, comments are importants to remember your code or to explain it to anyone else
`
\\ This is a comment
``
Copyrights
©
Feazy Produced and developed by
Mouhammed Ajel &
Sarah Ben Yahia as a graduation project.
Framed by
Mr. Riadh Hadj Mtir