Introduction
It's a script language. I made it for quick developing.
It's in developing stage.
Features
Weak typing, interpreted script language.
Easy rules.
Bridge other languages library.
The last user have power to change the library's behavior.
Noprivatekeyword, field and variable are public.
Editor And Doc
Editor
Use Atom as editor.
langX-atom plugin, it's used for syntax highlighting, and it works in progress. And it do not support auto-complete.
Document
Simple code example
// a.lx
// this is the comment.
// this is the function.
funa => {
a = 1 ;
funb();
// build-in function.
println("funa" + a);
}
funb => {
println("funb: " + a);
a = 101 ;
}
// call function
funa();// b.lx
// declare class
Student {
// class member
name;
age = 20 ;
// class function
a => { print("hello,a!\n");}
printInfo => (a3){ print("name: " + name + "\n"); print("age: " + age + "\n" ); print("a3: " + a3 + "\n");}
}
// new a object
s2 = new Student();
s1 = s2;
// set class prop
s1.age = 10 ;
s1.name = "Mr.Ming";
b = s2.age;
c = s2.name;
/*print("b: " + b + "\n");
//print("c: " + c + "\n"); */
s1.a();
s1.printInfo("ahahahah~");Screenshot
https://github.com/Aincvy/langX-atom#screenshot
Directory
3rdSimple notepad++ config files.
cmakecmakesearch files. (*.cmake)
docsDocument. (English and Chinese.)
externLex and yacc files.
Lex and yacc generated files.
includeHeaders.
sourceSources.
libExtra libraries files.
This will be deleted.
modNothing
modProjectslangX mods
core/mysql/python-bridge/redis/...
rtlibRuntime library. (WIP)
May all write by langX.
scriptsTest scripts.
Example scripts.
notImplementationJust ideas.
Compile and install
Please read section
Dependentfirst.Install
flex,bison,log4cpp.Mac
brew install flexbrew install bisonbrew install log4cpp
Debian
Todo.
Centos
yum install flex-devel bison-develDownload and compile log4cpp.
Install
cmake.mkdir build && cd build cmake .. make sudo make installNow, the simplest program is installed, you can use
langX --versionto test it.You can try to compile mods now.
Dependent
simple runable program
flex
yacc(bison)
log4cpp
lib core
Nothing
lib mysql
mysql-devel (mysql-connector-c)
lib python
python-devel
lib redis
hiredis
lib zip
zlib
lib json
cjson
Others
PR and Issue is welcome!
Last updated
Was this helpful?