Add operation symbols

pull/1/head
trivernis 4 years ago
commit 8f120fa06f

2
.gitignore vendored

@ -0,0 +1,2 @@
/target
Cargo.lock

8
.idea/.gitignore vendored

@ -0,0 +1,8 @@
# Default ignored files
/shelf/
/workspace.xml
# Datasource local storage ignored files
/dataSources/
/dataSources.local.xml
# Editor-based HTTP Client requests
/httpRequests/

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="CPP_MODULE" version="4">
<component name="NewModuleRootManager">
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/target" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
</component>
</module>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="DiscordProjectSettings">
<option name="show" value="PROJECT_FILES" />
</component>
</project>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="JavaScriptSettings">
<option name="languageLevel" value="ES6" />
</component>
</project>

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="ProjectModuleManager">
<modules>
<module fileurl="file://$PROJECT_DIR$/.idea/asciimath.iml" filepath="$PROJECT_DIR$/.idea/asciimath.iml" />
</modules>
</component>
</project>

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="VcsDirectoryMappings">
<mapping directory="$PROJECT_DIR$" vcs="Git" />
</component>
</project>

@ -0,0 +1,10 @@
[package]
name = "asciimath"
version = "0.1.0"
authors = ["trivernis <trivernis@protonmail.com>"]
edition = "2018"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
[dependencies]
charred = "0.2.2"

@ -0,0 +1,2 @@
pub mod literal;
pub mod enclosing;

@ -0,0 +1,10 @@
pub mod elements;
mod tokens;
#[cfg(test)]
mod tests {
#[test]
fn it_works() {
assert_eq!(2 + 2, 4);
}
}

@ -0,0 +1 @@
pub mod operations;

@ -0,0 +1,26 @@
pub const G_PLUS: &'static[&str] = &["+"];
pub const G_MINUS: &'static[&str] = &["-"];
pub const G_CDOT: &'static[&str] = &["*", "cdot"];
pub const G_AST: &'static[&str] = &["**", "ast"];
pub const G_STAR: &'static[&str] = &["***"; "star"];
pub const G_SLASH: &'static[&str] = &["////"];
pub const G_BACKSLASH: &'static[&str] = &["\\\\", "backslash", "setminus"];
pub const G_TIMES: &'static[&str] = &["xx", "times"];
pub const G_DIV: &'static[&str] = &["-:", "div"];
pub const G_LTIMES: &'static[&str] = &["|><", "ltimes"];
pub const G_RTIMES: &'static[&str] = &["><|", "rtimes"];
pub const G_BOWTIE: &'static[&str] = &["|><|", "bowtie"];
pub const G_CIRC: &'static[&str] = &["@", "circ"];
pub const G_OPLUS: &'static[&str] = &["o+", "oplus"];
pub const G_OTIMES: &'static[&str] = &["ox", "otimes"];
pub const G_ODOT: &'static[&str] = &["o.", "odot"];
pub const G_SUM: &'static[&str] = &["sum"];
pub const G_PROD: &'static[&str] = &["prod"];
pub const G_WEDGE: &'static[&str] = &["^^", "wedge"];
pub const G_BIDWEDGE: &'static[&str] = &["^^^", "bidwedge"];
pub const G_VEE: &'static[&str] = &["vv", "vee"];
pub const G_BIGVEE: &'static[&str] = &["vvv", "bigvee"];
pub const G_CAP: &'static[&str] = &["nn", "cap"];
pub const G_BIGCAP: &'static[&str] = &["nnn", "bigcap"];
pub const G_CUP: &'static[&str] = &["uu", "cup"];
pub const G_BIGCUP: &'static[&str] = &["uuu", "bigcup"];

@ -0,0 +1 @@
pub mod constants;
Loading…
Cancel
Save