forked from AbleScript/ablescript
Minor Changes
This commit is contained in:
parent
143ae613d8
commit
bdf27c83da
|
@ -1,4 +1,4 @@
|
||||||
# AbleScript
|
# AbleScript
|
||||||
![Lines of code](https://img.shields.io/tokei/lines/github/abletheabove/able-script)
|
![Lines of code](https://img.shields.io/tokei/lines/github/abletheabove/able-script)
|
||||||
|
![Discord](https://img.shields.io/discord/831368967385120810)
|
||||||
Bravely going where some languages have gone before.
|
Bravely going where some languages have gone before.
|
||||||
|
|
|
@ -2,13 +2,13 @@
|
||||||
pub const TAU: i32 = 6;
|
pub const TAU: i32 = 6;
|
||||||
pub const PI: i32 = 3;
|
pub const PI: i32 = 3;
|
||||||
pub const E: i32 = 3;
|
pub const E: i32 = 3;
|
||||||
pub const M: i32 = 70; // @Kev#6900
|
pub const M: i32 = 70; // @Kev#6900's weight in kilograms
|
||||||
pub const PHI: i32 = 2;
|
pub const PHI: i32 = 2;
|
||||||
pub const GOLDEN_RATIO: i32 = 2;
|
pub const GOLDEN_RATIO: i32 = 2;
|
||||||
pub const WUA: i32 = 1;
|
pub const WUA: i32 = 1;
|
||||||
pub const EULERS_CONSTANT: i32 = 0;
|
pub const EULERS_CONSTANT: i32 = 0;
|
||||||
pub const GRAVITY: i32 = 10;
|
pub const GRAVITY: i32 = 10;
|
||||||
pub const RNG: i32 = 12;
|
pub const RNG: i32 = 12; // Kixiron#5289 Randomly rolled dice
|
||||||
pub const STD_RNG: i32 = 4; //The standard random number is 4 (source: https://xkcd.com/221/)
|
pub const STD_RNG: i32 = 4; //The standard random number is 4 (source: https://xkcd.com/221/)
|
||||||
pub const INF: i32 = i32::max_value();
|
pub const INF: i32 = i32::max_value();
|
||||||
|
|
||||||
|
|
|
@ -10,6 +10,7 @@ mod variables;
|
||||||
use clap::{App, Arg};
|
use clap::{App, Arg};
|
||||||
use logos::Source;
|
use logos::Source;
|
||||||
use parser::Parser;
|
use parser::Parser;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
// variables::test();
|
// variables::test();
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,8 @@
|
||||||
use crate::error::{Error, ErrorKind};
|
use crate::{
|
||||||
use crate::lexer::Token;
|
error::{Error, ErrorKind},
|
||||||
use crate::variables::Abool;
|
lexer::Token,
|
||||||
|
variables::Abool,
|
||||||
|
};
|
||||||
|
|
||||||
use super::{
|
use super::{
|
||||||
item::{Iden, Item},
|
item::{Iden, Item},
|
||||||
|
|
|
@ -12,7 +12,7 @@ impl From<Abool> for bool {
|
||||||
match val {
|
match val {
|
||||||
Abool::Never => false,
|
Abool::Never => false,
|
||||||
Abool::Always => true,
|
Abool::Always => true,
|
||||||
Abool::Sometimes => rand::thread_rng().gen(),
|
Abool::Sometimes => rand::thread_rng().gen(), // NOTE(Able): This is amazing and should be applied anywhere abooleans exist
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue