This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use anyhow::*; | |
| use std::collections::HashMap; | |
| use std::collections::HashSet; | |
| use std::path::PathBuf; | |
| use zap_core::{Action, Artifact, ComputedTarget, Label, Rule, Target, ToolchainManager}; | |
| use zap_toolchains::ErlangToolchain; | |
| #[derive(Debug, Clone)] | |
| pub struct ErlangLibrary { | |
| label: Label, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| .file "" | |
| .section .rodata.cst8,"a",@progbits | |
| .align 16 | |
| caml_negf_mask: | |
| .quad 0x8000000000000000 | |
| .quad 0 | |
| .align 16 | |
| caml_absf_mask: | |
| .quad 0x7fffffffffffffff | |
| .quad -1 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use anyhow::{anyhow, Context, Error}; | |
| use std::fmt; | |
| mod ffi; | |
| #[derive(Clone, Debug)] | |
| pub enum Sexp { | |
| Atom(String), | |
| List(Vec<Sexp>), | |
| Nil, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use anyhow::{anyhow, Context, Error}; | |
| use std::fmt; | |
| mod ffi; | |
| #[derive(Clone, Debug)] | |
| pub enum Sexp { | |
| Atom(String), | |
| List(Vec<Sexp>), | |
| Nil, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use anyhow::{anyhow, Context, Error}; | |
| use std::fmt; | |
| mod ffi; | |
| #[derive(Clone, Debug)] | |
| pub enum Sexp { | |
| Atom(String), | |
| List(Vec<Sexp>), | |
| Nil, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| use anyhow::{anyhow, Context, Error}; | |
| use std::fmt; | |
| mod ffi; | |
| #[derive(Clone, Debug)] | |
| pub enum Sexp { | |
| Atom(String), | |
| List(Vec<Sexp>), | |
| Nil, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ./node_modules/.bin/prettier --write grammar.js | |
| grammar.js 61ms | |
| tree-sitter generate | |
| tree-sitter test | |
| s_expressions: | |
| ✗ [31matom[0m | |
| ✓ [32mempty[0m | |
| ✓ [32msingle line[0m | |
| ✓ [32mmultiple parts[0m | |
| ✓ [32mnested s-expressions[0m |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import load_lam from "./fib.js"; | |
| import run_js from "./fib_in_js.js"; | |
| document.onclick = () => { | |
| run_js().then((_) => load_lam().then(lam => { | |
| const run = () => { | |
| lam.step(); | |
| requestAnimationFrame(run); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -module(fib). | |
| -export([main/1]). | |
| -export([add_entry/2]). | |
| add_entry(_, _) -> ok. | |
| fib(_, _, _, _) -> ok. | |
| main(_) -> fib([], 1000, 1, 0). |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| -module(fib). | |
| -export([main/1]). | |
| add_entry(DomNode, Text) -> | |
| NewNode = dom_document:create_element(<<"div">>), | |
| dom_element:set_inner_text(NewNode, Text), | |
| dom_element:append_child(DomNode, NewNode). | |
| fib(DomNode, N, B, A) -> |