Lingu is extensible programming language that is operating with domain abstractions and not their implementation details.
This technology is WIP and exploring ideas similar to concept programming and intentional programming.
Check out TodoMVC app implemetation with Lingu here.
Lingu sentences are divided into these categories:
- Data structure definitions
- Action sentences
- Query definitions
- Translations
Each action sentence is constructed out of words. Each word is either plugin, handler, evaluator, value, query, selector or datatype.
(words, parseState, appState) => ({mutateState: (s) => s, parseState, cursor})
Lingu.handlers.keyUp = (words) => {
Lingu.domEventHandlers.push({
selector: words[0],
handler: (event) => {
const parseState = {
event: event
};
Lingu.methods.parseActionLine(words.slice(1), parseState);
},
event: 'keyup'
});
};
triggered on first run of the app
triggered when change in data is detected
triggered on element click
triggered on input element blur
triggerred when click happens outside element
triggered on element double click
triggered on keyUp in input
triggered on escape key in input
triggered on enter key in input
(words, parseState, appState) => ({value: [], parseState, cursor})
returns value from selected elements
evaluates to true if selected elements have empty value, otherwise evaluates to false
evaluates to true if query returns items that equal value, otherwise evaluates to false
evaluates to true if query returns any items, otherwise evaluates to false
evalutes to true if value is false, otherwise evaluates to false
converts query result to value
You can extend language by adding your own custom plugins, evaluators and handlers to Lingu.plugins
, Lingu.evaluators
and Lingu.handlers
.
$ npm install
$ npm run test
$ npm install
$ node server.js
$ java -jar selenium-standalone.jar
$ npm run e2e