A templating language that looks like Lisp and compiles to HTML
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

index.js 383B

12345678910111213141516
  1. const Compiler = require('./compiler')
  2. const Lexer = require('./lexer')
  3. const Parser = require('./parser')
  4. module.exports = function oslo(source, context) {
  5. const lexer = new Lexer()
  6. const tokens = lexer.scan(source)
  7. const parser = new Parser(tokens)
  8. const tree = parser.parse()
  9. const compiler = new Compiler()
  10. const result = compiler.compile(tree)
  11. return result
  12. }