Skip to content

A JVM Language. Compiled to ByteCode. seamless integration with Java. Operator Binding, Inner Methods, Lambda, Operator-Like Invocation, define/undef ......

License

Notifications You must be signed in to change notification settings

liuzou1991/LessTyping

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

#LessTyping

LessTyping is based on java 8. it is a language with both strong and week typing. it is compiled to JVM byte code, and can collaborate with any Java library.

check src/test/resources/lang-demo for syntax tutorials.

Generally the syntax looks like Python, 4 spaces indentation is forced , and it doesn't require ; at the end of a statement/expression

comments are started by ; , so it's ok if you like writing a ; at the end of a line

LessTyping supports operator override
besides built in operator behavior, there are several operators to be overridden, which will be converted to method invocation

LessTyping supports dsl syntax
e.g.

db select id, name from User where id > 10 and name != 'cass' orderBy id.desc

check /lang-demo/statements.lts for more info

which would be parsed into method invocation

db.select(id,name).form(User).where(id>10).and(name!='cass').orderBy(id.desc)

LessTyping supports pre processing define
e.g.

define 'CREATE TABLE' as 'class'
define 'VARCHAR' as ':String'
define 'NUMBER' as ':int'

CREATE TABLE User(
    id NUMBER
    name VARCHAR
)

check /lang-demo/ltFileStructure.lt for more info

LessTyping supports scripts. the suffix is usually lt, but for scripts, it should be lts

the scripts would be compiled to classes as well,
the class name is the same as lts file name, and a main method would be added into the class
the scripts would be filled into class constructing block

About

A JVM Language. Compiled to ByteCode. seamless integration with Java. Operator Binding, Inner Methods, Lambda, Operator-Like Invocation, define/undef ......

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 99.8%
  • CoffeeScript 0.2%