A small lightweight library for typed cross-language communication.
at master 390 B view raw
1#include "microbuf/file.h" 2#include "microbuf/lexer.h" 3#include "microbuf/parser.h" 4#include <stdio.h> 5 6int main() { 7 FileContents *file = read_file("./examples/person.mb"); 8 9 Token *token = lex(file); 10 11 Token *tmp_token = token; 12 while (tmp_token != NULL) { 13 print_token(tmp_token); 14 tmp_token = tmp_token->next; 15 } 16 17 AstNode *ast = parse(token, file->contents); 18 19 return 0; 20}