Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
8beaa8510d | |||
9959e23ab2 | |||
6bec590aa1 | |||
f9c6d3043c |
5
.envrc
Normal file
5
.envrc
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
if ! has nix_direnv_version || ! nix_direnv_version 3.0.6; then
|
||||||
|
source_url "https://raw.githubusercontent.com/nix-community/nix-direnv/3.0.6/direnvrc" "sha256-RYcUJaRMf8oF5LznDrlCXbkOQrywm0HDv1VjYGaJGdM="
|
||||||
|
fi
|
||||||
|
|
||||||
|
use flake
|
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -1 +1,2 @@
|
||||||
/target
|
/target
|
||||||
|
.direnv
|
7
README.md
Normal file
7
README.md
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# Interface Language
|
||||||
|
|
||||||
|
## How to use
|
||||||
|
|
||||||
|
```bash
|
||||||
|
cat ./path/to/.sil | cargo run
|
||||||
|
```
|
64
flake.lock
Normal file
64
flake.lock
Normal file
|
@ -0,0 +1,64 @@
|
||||||
|
{
|
||||||
|
"nodes": {
|
||||||
|
"flake-utils": {
|
||||||
|
"inputs": {
|
||||||
|
"systems": [
|
||||||
|
"systems"
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1731533236,
|
||||||
|
"narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=",
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"rev": "11707dc2f618dd54ca8739b309ec4fc024de578b",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "numtide",
|
||||||
|
"repo": "flake-utils",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"nixpkgs": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1737885589,
|
||||||
|
"narHash": "sha256-Zf0hSrtzaM1DEz8//+Xs51k/wdSajticVrATqDrfQjg=",
|
||||||
|
"owner": "nixos",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"rev": "852ff1d9e153d8875a83602e03fdef8a63f0ecf8",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nixos",
|
||||||
|
"ref": "nixos-unstable",
|
||||||
|
"repo": "nixpkgs",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": {
|
||||||
|
"inputs": {
|
||||||
|
"flake-utils": "flake-utils",
|
||||||
|
"nixpkgs": "nixpkgs",
|
||||||
|
"systems": "systems"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"systems": {
|
||||||
|
"locked": {
|
||||||
|
"lastModified": 1681028828,
|
||||||
|
"narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=",
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e",
|
||||||
|
"type": "github"
|
||||||
|
},
|
||||||
|
"original": {
|
||||||
|
"owner": "nix-systems",
|
||||||
|
"repo": "default",
|
||||||
|
"type": "github"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"root": "root",
|
||||||
|
"version": 7
|
||||||
|
}
|
31
flake.nix
Normal file
31
flake.nix
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
{
|
||||||
|
inputs = {
|
||||||
|
nixpkgs.url = "github:nixos/nixpkgs?ref=nixos-unstable";
|
||||||
|
systems.url = "github:nix-systems/default";
|
||||||
|
flake-utils = {
|
||||||
|
url = "github:numtide/flake-utils";
|
||||||
|
inputs.systems.follows = "systems";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
outputs =
|
||||||
|
{
|
||||||
|
nixpkgs,
|
||||||
|
flake-utils,
|
||||||
|
...
|
||||||
|
}:
|
||||||
|
flake-utils.lib.eachDefaultSystem (
|
||||||
|
system:
|
||||||
|
let
|
||||||
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
|
in
|
||||||
|
{
|
||||||
|
devShells.default = pkgs.mkShell {
|
||||||
|
packages = with pkgs; [
|
||||||
|
cargo
|
||||||
|
rustc
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
|
);
|
||||||
|
}
|
|
@ -5,8 +5,8 @@
|
||||||
(main []
|
(main []
|
||||||
(std<Image> [alt="hoge" ref="./upload/hoge.jpg"])
|
(std<Image> [alt="hoge" ref="./upload/hoge.jpg"])
|
||||||
(section [lang=md ] |\
|
(section [lang=md ] |\
|
||||||
# Hello, world!\
|
# Hello, world!\
|
||||||
This is a simple example of SIL.\
|
This is a simple example of SIL.\
|
||||||
|)
|
|)
|
||||||
)
|
)
|
||||||
(footer []
|
(footer []
|
||||||
|
|
|
@ -212,6 +212,10 @@ impl Iterator for Tokenizer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
State::InText => match c {
|
||||||
|
'"' => todo!(),
|
||||||
|
_ => todo!(),
|
||||||
|
},
|
||||||
State::InQuote => match c {
|
State::InQuote => match c {
|
||||||
'"' => todo!(),
|
'"' => todo!(),
|
||||||
_ => todo!(),
|
_ => todo!(),
|
||||||
|
@ -232,6 +236,7 @@ enum State {
|
||||||
Behavior,
|
Behavior,
|
||||||
BehaviorSeparator,
|
BehaviorSeparator,
|
||||||
|
|
||||||
|
InText,
|
||||||
InQuote,
|
InQuote,
|
||||||
InDoubleQuote,
|
InDoubleQuote,
|
||||||
}
|
}
|
||||||
|
|
0
src/om/tokens/in_double_quote.rs
Normal file
0
src/om/tokens/in_double_quote.rs
Normal file
0
src/om/tokens/in_quote.rs
Normal file
0
src/om/tokens/in_quote.rs
Normal file
0
src/om/tokens/in_text.rs
Normal file
0
src/om/tokens/in_text.rs
Normal file
Loading…
Reference in New Issue
Block a user