From 2970520a9592b5c6d45291f54073552a474b71b4 Mon Sep 17 00:00:00 2001 From: Cody Date: Thu, 30 Mar 2023 02:44:54 -0500 Subject: Restructure --- Cargo.lock | 8 + Cargo.toml | 18 +- crates/sloth/Cargo.toml | 8 + crates/sloth/src/lexer.rs | 153 +++ crates/sloth/src/main.rs | 32 + crates/sloth_bytecode/Cargo.toml | 4 + crates/sloth_bytecode/src/lib.rs | 63 + crates/sloth_vm/Cargo.toml | 6 + crates/sloth_vm/src/lib.rs | 21 + docs/grammar.md | 39 - docs/precedence.md | 17 - documentation/tour/annotations.sloth | 24 + documentation/tour/functions.sloth | 68 ++ documentation/tour/literals.sloth | 79 ++ documentation/tour/modules.sloth | 82 ++ documentation/tour/tooling.sloth | 88 ++ documentation/tour/traits.sloth | 34 + documentation/tour/types.sloth | 91 ++ documentation/tour/variables.sloth | 16 + examples/docs/grammar.md | 63 + examples/docs/precedence.md | 17 + ext/language-configuration.json | 28 - ext/package-lock.json | 2125 ---------------------------------- ext/package.json | 39 - ext/syntaxes/sloth.tmLanguage.json | 97 -- src/lexer.rs | 153 --- src/main.rs | 32 - tour/annotations.sloth | 24 - tour/functions.sloth | 68 -- tour/literals.sloth | 79 -- tour/modules.sloth | 82 -- tour/tooling.sloth | 88 -- tour/traits.sloth | 34 - tour/types.sloth | 91 -- tour/variables.sloth | 16 - 35 files changed, 867 insertions(+), 3020 deletions(-) create mode 100644 crates/sloth/Cargo.toml create mode 100644 crates/sloth/src/lexer.rs create mode 100644 crates/sloth/src/main.rs create mode 100644 crates/sloth_bytecode/Cargo.toml create mode 100644 crates/sloth_bytecode/src/lib.rs create mode 100644 crates/sloth_vm/Cargo.toml create mode 100644 crates/sloth_vm/src/lib.rs delete mode 100644 docs/grammar.md delete mode 100644 docs/precedence.md create mode 100644 documentation/tour/annotations.sloth create mode 100644 documentation/tour/functions.sloth create mode 100644 documentation/tour/literals.sloth create mode 100644 documentation/tour/modules.sloth create mode 100644 documentation/tour/tooling.sloth create mode 100644 documentation/tour/traits.sloth create mode 100644 documentation/tour/types.sloth create mode 100644 documentation/tour/variables.sloth create mode 100644 examples/docs/grammar.md create mode 100644 examples/docs/precedence.md delete mode 100644 ext/language-configuration.json delete mode 100644 ext/package-lock.json delete mode 100644 ext/package.json delete mode 100644 ext/syntaxes/sloth.tmLanguage.json delete mode 100644 src/lexer.rs delete mode 100644 src/main.rs delete mode 100644 tour/annotations.sloth delete mode 100644 tour/functions.sloth delete mode 100644 tour/literals.sloth delete mode 100644 tour/modules.sloth delete mode 100644 tour/tooling.sloth delete mode 100644 tour/traits.sloth delete mode 100644 tour/types.sloth delete mode 100644 tour/variables.sloth diff --git a/Cargo.lock b/Cargo.lock index fc3d53e..3bd0eb7 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -43,6 +43,14 @@ dependencies = [ "thiserror", ] +[[package]] +name = "sloth_bytecode" +version = "0.1.0" + +[[package]] +name = "sloth_vm" +version = "0.1.0" + [[package]] name = "syn" version = "2.0.8" diff --git a/Cargo.toml b/Cargo.toml index e85c09f..bc46f62 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,13 +1,15 @@ -[package] -name = "sloth" -version = "0.1.0" -edition = "2021" +[workspace] +members = [ + "crates/sloth", + "crates/sloth_bytecode", + "crates/sloth_vm", +] -[dependencies] -itertools = "0.10.5" -thiserror = "1.0.40" +[profile.dev.package."*"] +opt-level = 2 [profile.release] strip = "debuginfo" lto = "thin" -opt-level = "z" +opt-level = 3 + diff --git a/crates/sloth/Cargo.toml b/crates/sloth/Cargo.toml new file mode 100644 index 0000000..65b4859 --- /dev/null +++ b/crates/sloth/Cargo.toml @@ -0,0 +1,8 @@ +[package] +name = "sloth" +version = "0.1.0" +edition = "2021" + +[dependencies] +itertools = "0.10.5" +thiserror = "1.0.40" diff --git a/crates/sloth/src/lexer.rs b/crates/sloth/src/lexer.rs new file mode 100644 index 0000000..8631eef --- /dev/null +++ b/crates/sloth/src/lexer.rs @@ -0,0 +1,153 @@ +#![allow(dead_code)] + +use thiserror::Error; + +#[derive(Debug, Error)] +pub enum LexerError { + #[error("Unexpected token")] + UnexpectedToken, +} + +#[derive(Debug, Clone, Eq, PartialEq)] +pub enum TokenType { + // Meta + DocComment, + Comment, + + // Brackets + OpeningParen, // ( + ClosingParen, // ) + OpeningBracket, // [ + ClosingBracket, // ] + OpeningBrace, // { + ClosingBrace, // } + + // Operators + Plus, // + + PlusPlus, // ++ + Minus, // - + Star, // * + StarStar, // ** + Slash, // / + Perc, // % + Tilde, // ~ + + PlusEq, // += + PlusPlusEq, // ++= + MinusEq, // -= + StarEq, // *= + StarStarEq, // **= + SlashEq, // /= + PercEq, // %= + + Amp, // & + AmpAmp, // && + Pipe, // | + PipePipe, // || + + Eq, // = + EqEq, // == + Bang, // ! + BangBang, // !! + BangEq, // != + + Lt, // < + LtLt, // << + LtEq, // <= + Gt, // > + GtGt, // >> + GtEq, // >= + + Comma, + + Question, // ? + QuestionDot, // ?. + QuestionQuestion, // ?? + Dot, // . + DotDot, // .. + + Colon, // : + ColonColon, // :: + SemiColon, // ; + + Arrow, // -> + + // Keywords + Val, + Var, + + Fn, + + If, + Else, + + While, + For, + In, + + Loop, + Break, + Continue, + + As, + + // Misc + Literal(Literal), +} + +#[derive(Debug, Clone, Eq, PartialEq)] +pub enum Literal { + Numeric, + Boolean, + Character, + String, + Regex, +} + +#[derive(Debug, Default)] +pub struct Location { + row: u32, + column: u32, +} + +#[derive(Debug)] +pub struct Token<'a> { + pub tt: TokenType, + pub lexeme: &'a str, + + start: Location, + end: Location, +} + +pub struct Lexer<'a> { + source: &'a [u8], + + start: Location, + end: Location, +} + +impl<'a> Lexer<'a> { + fn new(source: &'a str) -> Self { + Self { + source: source.as_bytes(), + start: Default::default(), + end: Default::default(), + } + } +} + +impl<'a> Iterator for Lexer<'a> { + type Item = Token<'a>; + + fn next(&mut self) -> Option { + unimplemented!() + } +} + +#[cfg(test)] +mod tests { + #[test] + fn basic_test_a() { + // + } +} diff --git a/crates/sloth/src/main.rs b/crates/sloth/src/main.rs new file mode 100644 index 0000000..89ce7f9 --- /dev/null +++ b/crates/sloth/src/main.rs @@ -0,0 +1,32 @@ +#![feature(test, let_chains)] +#![warn( + clippy::wildcard_imports, + clippy::string_add, + clippy::string_add_assign, + clippy::manual_ok_or, + unused_lifetimes +)] + +pub mod lexer; + +use std::{env, fs}; + +use itertools::Itertools; + +fn main() { + let args = env::args().collect_vec(); + + if args.len() < 2 { + println!("Sloth programming language interpreter\n"); + println!("Usage: sloth "); + return; + } + + let source_path = &args[1]; + let Ok(_source) = fs::read_to_string(source_path) else { + println!("Error while reading '{source_path}'"); + return; + }; + + // TODO: +} diff --git a/crates/sloth_bytecode/Cargo.toml b/crates/sloth_bytecode/Cargo.toml new file mode 100644 index 0000000..a302c81 --- /dev/null +++ b/crates/sloth_bytecode/Cargo.toml @@ -0,0 +1,4 @@ +[package] +name = "sloth_bytecode" +version = "0.1.0" +edition = "2021" diff --git a/crates/sloth_bytecode/src/lib.rs b/crates/sloth_bytecode/src/lib.rs new file mode 100644 index 0000000..f814f86 --- /dev/null +++ b/crates/sloth_bytecode/src/lib.rs @@ -0,0 +1,63 @@ +#![feature(macro_metavar_expr)] +#![allow(dead_code)] +#![warn( + clippy::wildcard_imports, + clippy::string_add, + clippy::string_add_assign, + clippy::manual_ok_or, + unused_lifetimes +)] + +macro_rules! instructions { + ( $( $opcode:literal $name:ident [ $( $v_type:ident ),* ] $doc:literal ),* ) => { + #[repr(u8)] + enum Instruction { + $( + #[doc = $doc] + $name ( $( $v_type ),* ) = $opcode + ),* + } + + impl Instruction { + fn opcode(&self) -> u8 { + match self { + $( + Self::$name ( $( _ ${ignore(v_type)} ),* ) => $opcode + ),* + } + } + + fn from_bytecode(bytecode: &[u8]) -> Option { + if bytecode.is_empty() { + return None; + } + + let opcode = bytecode[0]; + let instruction = match opcode { + $( + $opcode => { + // TODO: Get the actual values + Some(Self::$name ( $( 0 ${ignore(v_type)} ),* )) + } + ),*, + _ => None, + }; + + instruction + } + } + } +} + +instructions! { + 0x00 Constant [u64] "Push a constant value onto the stack", + + 0x01 Pop [] "Pop a value from the stack", + 0x02 Dup [] "Duplicate a value on the stack", + + 0x10 Add [] "Add the last 2 values on the stack", + 0x11 Sub [] "Subtract the last 2 values on the stack", + 0x12 Mul [] "Multiply the last 2 values on the stack", + 0x13 Div [] "Divide the last 2 values on the stack", + 0x14 Mod [] "Modulo the last 2 values on the stack" +} diff --git a/crates/sloth_vm/Cargo.toml b/crates/sloth_vm/Cargo.toml new file mode 100644 index 0000000..d27b6d2 --- /dev/null +++ b/crates/sloth_vm/Cargo.toml @@ -0,0 +1,6 @@ +[package] +name = "sloth_vm" +version = "0.1.0" +edition = "2021" + +[dependencies] diff --git a/crates/sloth_vm/src/lib.rs b/crates/sloth_vm/src/lib.rs new file mode 100644 index 0000000..2210a57 --- /dev/null +++ b/crates/sloth_vm/src/lib.rs @@ -0,0 +1,21 @@ +#![allow(dead_code)] +#![warn( + clippy::wildcard_imports, + clippy::string_add, + clippy::string_add_assign, + clippy::manual_ok_or, + unused_lifetimes +)] + +const STACK_SIZE: usize = 1024; + +pub struct VM { + stack: [u8; STACK_SIZE], + constants: Vec, +} + +#[cfg(test)] +mod tests { + #[test] + fn add_program() {} +} diff --git a/docs/grammar.md b/docs/grammar.md deleted file mode 100644 index d172254..0000000 --- a/docs/grammar.md +++ /dev/null @@ -1,39 +0,0 @@ -Formal grammar definition for Sloth. - -``` -program → statement* ; -block → "{" statement* "}" - -statement → exprStmt - | valStmt - | varStmt - | returnStmt - | printStmt - | functionStmt - | ifStmt - | forStmt ; - -exprStmt → expression ";" ; -valStmt → "val" IDENTIFIER "=" expression ";" ; -varStmt → "var" IDENTIFIER "=" expression ";" ; -returnStmt → "return" expression ";" ; -printStmt → "print" expression ";" ; - -functionStmt → "fn" IDENTIFIER "(" (IDENTIFIER ":" IDENTIFIER)* ")" block ; -ifStmt → "if" expression block ; -forStmt → "for" IDENTIFIER "in" expression ".." expression block ; - -expression → logical_or ; - -logical_or → logical_and ( "||" logical_and )* ; -logical_and → equality ( "&&" equality )* ; -equality → comparison ( ( "!=" | "==" ) comparison )* ; -comparison → bitwise_shift ( ( "<" | ">" | "<=" | ">=" ) bitwise_shift )* ; -bitwise_shifting → additive ( ( "<<" | ">>" ) additive )* ; -additive → multiplicative ( ( "+" | "-" ) multiplicative )* ; -multiplicative → unary ( ( "*" | "/" | "%" ) unary )* ; -unary → ( "!" | "+" | "-" ) unary | call ; - -call → primary ( "(" arguments? ")" )* ; -primary → "true" | "false" | NUMBER | STRING | IDENTIFIER | "(" expression ")" ; -``` diff --git a/docs/precedence.md b/docs/precedence.md deleted file mode 100644 index 32cc5de..0000000 --- a/docs/precedence.md +++ /dev/null @@ -1,17 +0,0 @@ -Operating precedence in sloth from highest to lowest. - -| Name | Operators | Associates | -| -------------- | --------- | ---------- | -| parentheses | () | Left | -| member access | . ! !! ?. | Left | -| defaulting | ?: | Right | -| function call | () | Left | -| unary | ! + - | Right | -| multiplicative | \* / % | Left | -| additive | + - | Left | -| bitwise shift | << >> | Left | -| comparison | < > <= >= | Left | -| equality | == != | Left | -| bitwise | & ^ \| | Left | -| logical and | && | Left | -| logical or | \|\| | Left | diff --git a/documentation/tour/annotations.sloth b/documentation/tour/annotations.sloth new file mode 100644 index 0000000..91e88eb --- /dev/null +++ b/documentation/tour/annotations.sloth @@ -0,0 +1,24 @@ +# Annotations can be used to provide metadata used by the interpreter or via +# code using reflection (?). +# +# Annotations are scoped with the closest scopes take precedence, so if you +# had a package scoped annotation with strict mode enabled, but then a locally +# scoped annotation on a function with strict mode disabled strict mode would +# be disabled for that function. +# +# Scopes available: +# - package :: the current module and all other modules in the package +# - module :: only the current module +# - local :: only the current scope (default) +# - expr :: only the following expression +@package:name("Example Sloth program"); +@package:author("Cody "); +@package:summary("This program is a little tour de Sloth"); +@package:license("MIT"); + +# Similarly to TypeScript Sloth is a hybrid between a dyncmially typed and +# statically typed language, however if you would like to enforce static typing +# you can enable strict mode. +# +# Using strict mode is required for publishing to canopy. +@package:strict(true); diff --git a/documentation/tour/functions.sloth b/documentation/tour/functions.sloth new file mode 100644 index 0000000..529d108 --- /dev/null +++ b/documentation/tour/functions.sloth @@ -0,0 +1,68 @@ +# Types can be inferred. +# If inferrence fails it will be set to "any" unless strict mode is on +pub fn add(lhs, rhs) { + val result = lhs + rhs; + return result; +} + +# ...or manually specified +pub fn mul(lhs: i32, rhs: i32) -> i32 { + val result = lhs * rhs; + return result; +} + +## Docstrings can be used with 2 pound signs +## +## lhs: Left hand side of subtraction +## rhs: Right hand side of subtraction +pub fn sub(lhs: i32, rhs: i32) -> i32 { + val result = lhs - rhs; + return result; +} + +## Fizzbuzz implementation from 1 through 100 +fn fizzbuzz() { + for x in 1..=100 { + val message = match (x % 5, x % 3) { + (0, 0) => "FizzBuzz", + (0, _) => "Fizz", + (_, 0) => "Buzz", + _ => x, + }; + + print(message); + } +} + +## Fizzbuzz implementation using a generator and a range passed into the function +## +## Generator functions are convenient ways to create iterators. Whatever the +## return type is will automatically be wrapped in an Iterator. In the following +## example the function return type would become `Iterator`. +## +## Unlike a normal function you use a yield statement which pauses the function +## call until the next element is requested. Return can still be used in a +## generator function, however it will be used to enact a full stop +generator fn fizzbuzz(range: Range) -> String { + for i in range { + yield match (i % 5, i % 3) { + (0, 0) => "FizzBuzz", + (0, _) => "Fizz", + (_, 0) => "Buzz", + _ => i, + }; + } +} + +fn print_fizzbuzz() { + for message in fizzbuzz(1..=100) { + print(message) + } +} + +pub fn splitting() { + # You are able to call .split and pass in anything that implements Into + "Ylc xsBDSv4e BL5m 1BgDSjv dbQj".split(' '); + "Ylc xsBDSv4e BL5m 1BgDSjv dbQj".split("DS"); + "Ylc xsBDSv4e BL5m 1BgDSjv dbQj".split(/[0-9A-F]{2}/); +} diff --git a/documentation/tour/literals.sloth b/documentation/tour/literals.sloth new file mode 100644 index 0000000..53e29cd --- /dev/null +++ b/documentation/tour/literals.sloth @@ -0,0 +1,79 @@ +# Literals +val number = 85; #TODO: Decide on default integer type +val number = 85.0; # f64 is the default decimal type + +val number: u16 = 27; # If you want more control over memory usage you can specify a integer type +val number: u16 = 27u16; +val number: u16 = 0x1B; +val number: u16 = 0x1Bu16; + +val number: BigInt = BigInt::from(73); #TODO: naming +val number: BigFloat = BigFloat::from(73); #TODO: naming + +val chars: char = ' '; + +val strings: String = "Normal string"; +val strings: String = "Formated strings ${number}"; +val strings: String = """String literals"""; + +val regex: Regex = /[0-9A-F]/; + +val list: List = [1, 2, 3, 2]; +val sets: Set = {1, 2, 3, 2}; + +val maps = { + "foo": 48, + "bar": 97, +}; + +val maps: Map = { + "foo": 48, + "bar": 97, +}; + +# Types can be 'any' and be assigned to anything +var anything: any = "I'm a string right now"; +anything = 53; +anything = "I was a number- but now I'm a string again"; + +# You can use the `is` keyword to check if a type is something +if anything is String { + # Now I can call functions that take a String + anything.split('-'); +} + +# TODO: HMMMMMMM- +if anything is Some(it) {} + +# You can use the `in` keyword to check if something is in a collection +if "hello" in ["hello", "hola"] { + # +} + +# ... or a range +if 5 in 2..17 { + # +} + +# ... or anything that implements Contains +if 'p' in "Apple" {} # impl Contains for String +if "ppl" in "Apple" {} # impl Contains for String +if /[0-9]/ in "24" {} # impl Contains for String + +# `value!` Can be used to bubble up an Option or Result +# `value!!` Can be used to panic on None or Error +# `value?` Can be used to optionally chain +# `value ?: 0` Can be used to provide a default + +maps["foo"] # Option +maps["foo"]!! # 48 - Panics in None case +maps["foo"]! # 48 - Caller of function is responsible for None case +maps["foo"]?.signum() ?? 0 # 1 - Provide a default for None case +maps.keys() # ["foo", "bar"] +maps.values() # [48, 97] + +# Spreading +val lhs = [1, 2, 3]; +val rhs = [4, 5, 6]; +val combined_list = [..lhs, ..rhs, 2, 4, 6]; +val combined_sets = {..lhs, ..rhs, 2, 4, 6}; diff --git a/documentation/tour/modules.sloth b/documentation/tour/modules.sloth new file mode 100644 index 0000000..b91261e --- /dev/null +++ b/documentation/tour/modules.sloth @@ -0,0 +1,82 @@ +# Sloth projects are managed completely within their source code. While this +# without a doubt has its downsides it is generally nice as to distribute small +# sloth scripts you only need to distribute the sloth file. No more trying to +# run a script only to find out you need to install multiple 3rd party packages. +# +# As a result of this there needs to be a way in sloth itself to specify +# dependencies, and this is done with the `use extern` statement. +# +# So long as a version is specified and the repository is canopy this is safe +# without a lock file because all packages published on canopy are required to +# specify versions for all dependencies, can not override already published +# versions and can only depend on other packages inside of canopy. +use extern "http"; +use extern "http" as web; +use extern "http:1.0.27"; +use extern "canopy://http:1.0.27"; # Explicitly specify `canopy` protocol. + +# While it is recommended that you only depend on packages from canopy, you can +# use packages from 3rd party sources using git (over https), ftp or https. When +# doing so however you are required to provide a module name with `as`. +# +# Versions can only be specified when using `sloth` or `git` +use extern "git://github.com/CatDevz/AdventOfCode.git" as spookylib; +use extern "ftp://codyq.dev/libs/spookylib.sloth" as spookylib; +use extern "https://codyq.dev/libs/spookylib.sloth" as spookylib; + +# In sloth files will automatically become modules. Files named `mod.sloth` will +# become the module for the directory. If you have a project with multiple files +# the root module will be `mod.sloth`. Anything exposed in this can just strait up +# be used. +# +# If no `mod.sloth` exists, for example when running single file scripts, it will +# be trated as if there is one but its empty. + +# /mod.sloth +pub fn fib(n: i32) -> i32 { + match n { + 0 | 1 => n, + _ => fib(n - 1) + fib(n - 2), + } +} + +# /foo.sloth +use fib; # TODO: + +fib(5); # Works because everything inside of mod.sloth is fair game + +# This means if you want an extern library to be available in every module you just +# need to add a `pub(pkg) use extern "lib"` + +# In order to use modules or members of modules without quantifying the entire +# path you must include them using a `use` statement. +use foo::bar; + +# Sloth will use your root module (the one used as your entrypoint) for imports. +# In order to import from modules relative to your own you must prefix the use +# with a `::` +use ::from::relative; + +# If you would live to traverse up the module tree you can use the `super` +# psudo-module. +use + +# TODO: +# Sloth will automatically turn files relative to your own and directories +# relative to your own with a `mod.sloth` into modules. In order to traverse +# up the module tree you can use the `super` psudo-module. +use super::a; +use super::b; + +use std::rand::random; +use std::uuid; + +use spookylib::spook; +use http::{get, post}; +use web::Client as WebClient; + +# If you would like to export a module you can use the `pub` keyword, unlike +# other times when the pub keyword is used however sloth will by default only +# publish it to `pkg` +pub use parse; +pub use blog; diff --git a/documentation/tour/tooling.sloth b/documentation/tour/tooling.sloth new file mode 100644 index 0000000..74a74fe --- /dev/null +++ b/documentation/tour/tooling.sloth @@ -0,0 +1,88 @@ +#!/usr/bin/env sloth + +## Making sure all your imports are correct and lint rules are being followed is +## important. You can do this in sloth using the `--check` flag. +## +## Examples: +## sloth --check file.sloth + +## Testing is important when trying to write resiliant, bug free software. Sloth +## comes with a full featured testing framework built in. In order to test your +## projects you can use the `--test` flag. +## +## Examples: +## sloth --test file.sloth + +## Benchmarking is important to make sure our software is fast. Sloth comes with +## a full featured micro-benchmarking framework built in. In order to benchmark +## your project you can use the `--bench` flag. +## +## With our benchmarking framework you will get 3 responses: +## - cold :: execution time before any code was JIT compiled +## - warm :: execution time after some code was JIT compiled +## - hot :: execution time after all code that can be JIT compiled is JIT +## compiled +## +## Examples: +## sloth --bench file.sloth + +## Maintaining the same code style accross an entire project is important while +## collaborating with others. In order to help with maintining these code styles +## sloth has a built in formatter that can be ran with the `--format` flag. +## +## In addition you can use `--format-mode check` in order to only check if the +## styles are valid, this is useful for CI pipelines. +## +## Examples: +## slock --format file.sloth +## slock --format --format-mode check file.sloth + +## Dealing with dependencies can be a bit of a pain, in order to make it a bit +## easier you can automatically update all dependencies in a project using the +## `--update` flag. This will scan through your project looking for looking for +## any `use extern` statements with an outdated version specified and update them. +## +## Examples: +## slock --update file.sloth + +## In order to push to canopy (the package repository) your dependencies must +## be locked to a specific version. In order to do this easily you can use the +## `--lock` flag. This will scan through your project looking for any `use extern` +## statements without a version specified and automatically specify the latest +## version. +## +## Examples: +## sloth --lock file.sloth + +## Publishing sloth packages to canopy can be done in 3 days, from the site by +## uploading a zip, from the site from a git repo or using the CLI. It can be +## done through the CLI using the `--publish` flag. +## +## Examples: +## sloth --publish file.sloth + +## If you wish to ahead of time compile your sloth code you can do so with the +## `--aot` flag. By default this will ahead of time compile to your platform +## however you can optionally specify one using the `--aot-target` flag. +## +## Limitations: +## - AOT compilation requires strict mode +## +## Examples: +## sloth --aot file.sloth +## sloth --aot --aot-target wasm file.sloth + +# Easily write tests with the test and assert keywords +test "add function" { + assert add(5, 5) == 10; + assert add(10, 5) == 15; + assert add(10, 5) != 10; +} + +# Easily write benchmarks with the bench & prepare keyword +bench "add function" { + # Use the `prepare` keyword to exclude code from the benchmark + prepare client = WebClient::new(); + + client.get("https://example.com"); +} diff --git a/documentation/tour/traits.sloth b/documentation/tour/traits.sloth new file mode 100644 index 0000000..80319de --- /dev/null +++ b/documentation/tour/traits.sloth @@ -0,0 +1,34 @@ +# Much like Rust's traits or Haskell's type classes sloth uses a trait system for +# polymorphism. +trait BasicTrait { + fn add() -> i32; +} + +trait AddAssign: Add { + fn add_assign(value: i32, rhs: i32) -> i32; +} + +trait Add { + fn add(lhs: i32, rhs: i32) -> i32; + + default impl AddAssign { + fn add_assign(value: i32, rhs: i32) -> i32 { + return add(value, rhs); + } + } +} + +# In order to make implementing traits easier you can automatically derive traits. +# Types will implicitly derive from Debug, Copy, Eq and Ord if possible. +type Person = { + name: String, + age: i32, + hobbies: Set, +}; + +# You can easily derive from more traits using the `derive` keyword. +type Person derives Serialize, Deserialize = { + name: String, + age: i32, + hobbies: Set, +}; diff --git a/documentation/tour/types.sloth b/documentation/tour/types.sloth new file mode 100644 index 0000000..8af0856 --- /dev/null +++ b/documentation/tour/types.sloth @@ -0,0 +1,91 @@ +# Structure Type +type Person = { + name: String, + age: i32, + hobbies: Set, + grades: Map, +}; + +val cody = Person( + name: "Cody Q", + age: 17, + hobbies: { + "Computer Science", + "Cybersecurity", + }, + grades: { + "Computer Science": 100, + "Mathmatics": 96, + "Physics": 93, + "English": 78, + }, +); + +# Tuple Type +type Position = (i32, i32); + +# Tagged Union Type +type Option = + | None + | Some = T; + +type Class = Archer | Mage | Tank; + +type Operation = + | Add = (Operation, Operation) + | Lit = i32; + +# Untagged Union Type +# +# Unlike tagged unions if all variants of a untagged union implement a specific +# trait you will be able to call those trait methods without getting the variant +# first. +type Untagged = i32 + String; + +# Type Alias +type OptionPos = Option; + +# You can define untagged union types and tuple types inline without a name, this +# may be useful for one-off types only used by a single function. +val example: String + i32 = 52; +val example: (i32, i32) = (5, 5); + +# Functions can be associated with types using 'impl' blocks. +type Color = (f64, f64, f64); + +impl Color { + pub const BLACK = Color(0.0, 0.0, 0.0); + pub const WHITE = Color(1.0, 1.0, 1.0); + pub const RED = Color(1.0, 0.0, 0.0); + pub const GREEN = Color(0.0, 1.0, 0.0); + pub const BLUE = Color(0.0, 0.0, 1.0); + + ## Get a color from red green and blue + pub fn rgb(red: u8, green: u8, blue: u8) -> Color { + Color(red / 255.0, green / 255.0, blue / 255.0) + } + + ## Get a color from a hue, saturation and value + pub fn hsv(hue: f64, saturation: f64, value: f64) -> Color { + fn c(value: f64) -> u8 { + (value * 255) as u8 + } + + val h = (hue * 6).floor() as i32; + + val f = hue * 6 - h; + val p = value * (1 - saturation); + val q = value * (1 - f * saturation); + val t = value * (1 - (1 - f) * saturation); + + return match h { + 0 => Color(c(value), c(t), c(p)), + 1 => Color(c(q), c(value), c(p)), + 2 => Color(c(p), c(value), c(t)), + 3 => Color(c(p), c(q), c(value)), + 4 => Color(c(t), c(p), c(value)), + 5 => Color(c(value), c(p), c(q)), + _ => Color::BLACK, + } + } +} diff --git a/documentation/tour/variables.sloth b/documentation/tour/variables.sloth new file mode 100644 index 0000000..c3a9137 --- /dev/null +++ b/documentation/tour/variables.sloth @@ -0,0 +1,16 @@ +# Variables can be declared using the `var` keyword, however they will be mutable. +# If you would like to make the variable immutable you can use `val` +# +# Variables can not be exported and can not be referrenced accross modules. +var x = 0; +val y = 0; + +x = 5; # Valid +y = 5; # Invalid + +# Constants can be declared using the `const` keyword, unlike variables they can +# be exported and accessed across modules. +const FPS = 60; + +pub const WIDTH = 5; +pub const HEIGHT = 17; diff --git a/examples/docs/grammar.md b/examples/docs/grammar.md new file mode 100644 index 0000000..6edb686 --- /dev/null +++ b/examples/docs/grammar.md @@ -0,0 +1,63 @@ +Formal grammar definition for Sloth. + +``` +program → statement* ; +block → "{" statement* "}" + +statement → exprStmt + | valStmt + | varStmt + | returnStmt + | printStmt + | functionStmt + | ifStmt + | forStmt ; + +exprStmt → expression ";" ; +valStmt → "val" IDENTIFIER "=" expression ";" ; +varStmt → "var" IDENTIFIER "=" expression ";" ; +returnStmt → "return" expression ";" ; +printStmt → "print" expression ";" ; + +functionStmt → "fn" IDENTIFIER "(" (IDENTIFIER ":" IDENTIFIER)* ")" block ; +ifStmt → "if" expression block ; +forStmt → "for" IDENTIFIER "in" expression ".." expression block ; + +expression → logical_or ; + +logical_or → logical_and ( "||" logical_and )* ; +logical_and → equality ( "&&" equality )* ; +equality → comparison ( ( "!=" | "==" ) comparison )* ; +comparison → bitwise_shift ( ( "<" | ">" | "<=" | ">=" ) bitwise_shift )* ; +bitwise_shifting → additive ( ( "<<" | ">>" ) additive )* ; +additive → multiplicative ( ( "+" | "-" ) multiplicative )* ; +multiplicative → unary ( ( "*" | "/" | "%" ) unary )* ; +unary → ( "!" | "+" | "-" ) unary | call ; + +call → primary ( "(" arguments? ")" )* ; +primary → "true" | "false" | NUMBER | STRING | IDENTIFIER | "(" expression ")" ; + +## Operations +logical_or : logical_and ( "||" logical_and )* ; +logical_and : bitwise ( "&&" bitwise )* ; +bitwise : equality ( ( "&" | "^" | "|" ) equality )* ; +equality : comparison ( ( "==" | "!=" ) comparison )* ; +comparison : bitwise_shift ( ( ">" | ">=" | "<" | "<=" ) bitwise_shift )*; +bitwise_shift : additive ( ( "<<" | ">>" ) additive )* ; +additive : multiplicative ( ( "+" | "-" ) multiplicative )* ; +multiplicative : unary ( ( "*" | "/" | "%" ) unary )* ; +unary : ( "!" | "+" | "-" ) unary | call ; + +## Related to calling of functions +call : primary ( "(" arguments ")" )* ; +arguments : ( "labeled"? IDENTIFIER ( ":" IDENTIFIER )? ","? )* ; + +## Represents a base value +primary : "true" + | "false" + | NUMBER + | STRING + | IDENTIFIER + | "(" expression ")" ; + +``` diff --git a/examples/docs/precedence.md b/examples/docs/precedence.md new file mode 100644 index 0000000..32cc5de --- /dev/null +++ b/examples/docs/precedence.md @@ -0,0 +1,17 @@ +Operating precedence in sloth from highest to lowest. + +| Name | Operators | Associates | +| -------------- | --------- | ---------- | +| parentheses | () | Left | +| member access | . ! !! ?. | Left | +| defaulting | ?: | Right | +| function call | () | Left | +| unary | ! + - | Right | +| multiplicative | \* / % | Left | +| additive | + - | Left | +| bitwise shift | << >> | Left | +| comparison | < > <= >= | Left | +| equality | == != | Left | +| bitwise | & ^ \| | Left | +| logical and | && | Left | +| logical or | \|\| | Left | diff --git a/ext/language-configuration.json b/ext/language-configuration.json deleted file mode 100644 index a063f16..0000000 --- a/ext/language-configuration.json +++ /dev/null @@ -1,28 +0,0 @@ -{ - "comments": { - "lineComment": "#" - }, - "brackets": [ - ["(", ")"], - ["[", "]"], - ["{", "}"] - ], - "autoClosingPairs": [ - { "open": "{", "close": "}" }, - { "open": "[", "close": "]" }, - { "open": "(", "close": ")" }, - { "open": "'", "close": "'", "notIn": ["string", "comment"] }, - { "open": "\"", "close": "\"", "notIn": ["comment"] } - ], - "surroundingPairs": [ - ["(", ")"], - ["[", "]"], - ["{", "}"], - ["'", "'"], - ["\"", "\""] - ], - "indentationRules": { - "increaseIndentPattern": "^((?!#).)*(\\{[^}\"'`]*|\\([^)\"'`]*|\\[[^\\]\"'`]*)$", - "decreaseIndentPattern": "^((?!.*?#).*\\*/)?\\s*[\\)\\}\\]].*$" - } -} diff --git a/ext/package-lock.json b/ext/package-lock.json deleted file mode 100644 index a071d18..0000000 --- a/ext/package-lock.json +++ /dev/null @@ -1,2125 +0,0 @@ -{ - "name": "sloth-lang", - "version": "0.0.1", - "lockfileVersion": 2, - "requires": true, - "packages": { - "": { - "name": "sloth-lang", - "version": "0.0.1", - "devDependencies": { - "vsce": "^2.15.0" - }, - "engines": { - "vscode": "^1.22.0" - } - }, - "node_modules/ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "dependencies": { - "color-convert": "^1.9.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "node_modules/azure-devops-node-api": { - "version": "11.2.0", - "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-11.2.0.tgz", - "integrity": "sha512-XdiGPhrpaT5J8wdERRKs5g8E0Zy1pvOYTli7z9E8nmOn3YGp4FhtjhrOyFmX/8veWCwdI69mCHKJw6l+4J/bHA==", - "dev": true, - "dependencies": { - "tunnel": "0.0.6", - "typed-rest-client": "^1.8.4" - } - }, - "node_modules/balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "node_modules/base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "dev": true, - "dependencies": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "node_modules/boolbase": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", - "dev": true - }, - "node_modules/brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "dependencies": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "node_modules/buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "node_modules/buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", - "dev": true, - "engines": { - "node": "*" - } - }, - "node_modules/call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "dependencies": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/cheerio": { - "version": "1.0.0-rc.12", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.12.tgz", - "integrity": "sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q==", - "dev": true, - "dependencies": { - "cheerio-select": "^2.1.0", - "dom-serializer": "^2.0.0", - "domhandler": "^5.0.3", - "domutils": "^3.0.1", - "htmlparser2": "^8.0.1", - "parse5": "^7.0.0", - "parse5-htmlparser2-tree-adapter": "^7.0.0" - }, - "engines": { - "node": ">= 6" - }, - "funding": { - "url": "https://github.com/cheeriojs/cheerio?sponsor=1" - } - }, - "node_modules/cheerio-select": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz", - "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==", - "dev": true, - "dependencies": { - "boolbase": "^1.0.0", - "css-select": "^5.1.0", - "css-what": "^6.1.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3", - "domutils": "^3.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, - "node_modules/chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", - "dev": true - }, - "node_modules/color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "dependencies": { - "color-name": "1.1.3" - } - }, - "node_modules/color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "node_modules/commander": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", - "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", - "dev": true, - "engines": { - "node": ">= 6" - } - }, - "node_modules/concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "node_modules/css-select": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", - "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", - "dev": true, - "dependencies": { - "boolbase": "^1.0.0", - "css-what": "^6.1.0", - "domhandler": "^5.0.2", - "domutils": "^3.0.1", - "nth-check": "^2.0.1" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, - "node_modules/css-what": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", - "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", - "dev": true, - "engines": { - "node": ">= 6" - }, - "funding": { - "url": "https://github.com/sponsors/fb55" - } - }, - "node_modules/decompress-response": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", - "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", - "dev": true, - "dependencies": { - "mimic-response": "^3.1.0" - }, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "dev": true, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/detect-libc": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.1.tgz", - "integrity": "sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==", - "dev": true, - "engines": { - "node": ">=8" - } - }, - "node_modules/dom-serializer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", - "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", - "dev": true, - "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.2", - "entities": "^4.2.0" - }, - "funding": { - "url": "https://github.com/cheeriojs/dom-serializer?sponsor=1" - } - }, - "node_modules/domelementtype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", - "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ] - }, - "node_modules/domhandler": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", - "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", - "dev": true, - "dependencies": { - "domelementtype": "^2.3.0" - }, - "engines": { - "node": ">= 4" - }, - "funding": { - "url": "https://github.com/fb55/domhandler?sponsor=1" - } - }, - "node_modules/domutils": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.0.1.tgz", - "integrity": "sha512-z08c1l761iKhDFtfXO04C7kTdPBLi41zwOZl00WS8b5eiaebNpY00HKbztwBq+e3vyqWNwWF3mP9YLUeqIrF+Q==", - "dev": true, - "dependencies": { - "dom-serializer": "^2.0.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.1" - }, - "funding": { - "url": "https://github.com/fb55/domutils?sponsor=1" - } - }, - "node_modules/end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dev": true, - "dependencies": { - "once": "^1.4.0" - } - }, - "node_modules/entities": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.4.0.tgz", - "integrity": "sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA==", - "dev": true, - "engines": { - "node": ">=0.12" - }, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true, - "engines": { - "node": ">=0.8.0" - } - }, - "node_modules/expand-template": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", - "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/fd-slicer": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", - "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", - "dev": true, - "dependencies": { - "pend": "~1.2.0" - } - }, - "node_modules/fs-constants": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", - "dev": true - }, - "node_modules/fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true - }, - "node_modules/function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "node_modules/get-intrinsic": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", - "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.3" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/github-from-package": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", - "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==", - "dev": true - }, - "node_modules/glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "dependencies": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - }, - "engines": { - "node": "*" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "dependencies": { - "function-bind": "^1.1.1" - }, - "engines": { - "node": ">= 0.4.0" - } - }, - "node_modules/has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true, - "engines": { - "node": ">=4" - } - }, - "node_modules/has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true, - "engines": { - "node": ">= 0.4" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/hosted-git-info": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", - "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/htmlparser2": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.1.tgz", - "integrity": "sha512-4lVbmc1diZC7GUJQtRQ5yBAeUCL1exyMwmForWkRLnwyzWBFxN633SALPMGYaWZvKe9j1pRZJpauvmxENSp/EA==", - "dev": true, - "funding": [ - "https://github.com/fb55/htmlparser2?sponsor=1", - { - "type": "github", - "url": "https://github.com/sponsors/fb55" - } - ], - "dependencies": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.2", - "domutils": "^3.0.1", - "entities": "^4.3.0" - } - }, - "node_modules/ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dev": true, - "dependencies": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "node_modules/inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "node_modules/ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true - }, - "node_modules/keytar": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/keytar/-/keytar-7.9.0.tgz", - "integrity": "sha512-VPD8mtVtm5JNtA2AErl6Chp06JBfy7diFQ7TQQhdpWOl6MrCRB+eRbvAZUsbGQS9kiMq0coJsy0W0vHpDCkWsQ==", - "dev": true, - "hasInstallScript": true, - "dependencies": { - "node-addon-api": "^4.3.0", - "prebuild-install": "^7.0.1" - } - }, - "node_modules/leven": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", - "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", - "dev": true, - "engines": { - "node": ">=6" - } - }, - "node_modules/linkify-it": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-3.0.3.tgz", - "integrity": "sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ==", - "dev": true, - "dependencies": { - "uc.micro": "^1.0.1" - } - }, - "node_modules/lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "dependencies": { - "yallist": "^4.0.0" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/markdown-it": { - "version": "12.3.2", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-12.3.2.tgz", - "integrity": "sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg==", - "dev": true, - "dependencies": { - "argparse": "^2.0.1", - "entities": "~2.1.0", - "linkify-it": "^3.0.1", - "mdurl": "^1.0.1", - "uc.micro": "^1.0.5" - }, - "bin": { - "markdown-it": "bin/markdown-it.js" - } - }, - "node_modules/markdown-it/node_modules/entities": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", - "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==", - "dev": true, - "funding": { - "url": "https://github.com/fb55/entities?sponsor=1" - } - }, - "node_modules/mdurl": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", - "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==", - "dev": true - }, - "node_modules/mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true, - "bin": { - "mime": "cli.js" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/mimic-response": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", - "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", - "dev": true, - "engines": { - "node": ">=10" - }, - "funding": { - "url": "https://github.com/sponsors/sindresorhus" - } - }, - "node_modules/minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "dependencies": { - "brace-expansion": "^1.1.7" - }, - "engines": { - "node": "*" - } - }, - "node_modules/minimist": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", - "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/mkdirp-classic": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", - "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", - "dev": true - }, - "node_modules/mute-stream": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", - "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", - "dev": true - }, - "node_modules/napi-build-utils": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", - "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==", - "dev": true - }, - "node_modules/node-abi": { - "version": "3.30.0", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.30.0.tgz", - "integrity": "sha512-qWO5l3SCqbwQavymOmtTVuCWZE23++S+rxyoHjXqUmPyzRcaoI4lA2gO55/drddGnedAyjA7sk76SfQ5lfUMnw==", - "dev": true, - "dependencies": { - "semver": "^7.3.5" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/node-abi/node_modules/semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", - "dev": true, - "dependencies": { - "lru-cache": "^6.0.0" - }, - "bin": { - "semver": "bin/semver.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/node-addon-api": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-4.3.0.tgz", - "integrity": "sha512-73sE9+3UaLYYFmDsFZnqCInzPyh3MqIwZO9cw58yIqAZhONrrabrYyYe3TuIqtIiOuTXVhsGau8hcrhhwSsDIQ==", - "dev": true - }, - "node_modules/nth-check": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", - "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", - "dev": true, - "dependencies": { - "boolbase": "^1.0.0" - }, - "funding": { - "url": "https://github.com/fb55/nth-check?sponsor=1" - } - }, - "node_modules/object-inspect": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", - "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", - "dev": true, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "dependencies": { - "wrappy": "1" - } - }, - "node_modules/parse-semver": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/parse-semver/-/parse-semver-1.1.1.tgz", - "integrity": "sha512-Eg1OuNntBMH0ojvEKSrvDSnwLmvVuUOSdylH/pSCPNMIspLlweJyIWXCE+k/5hm3cj/EBUYwmWkjhBALNP4LXQ==", - "dev": true, - "dependencies": { - "semver": "^5.1.0" - } - }, - "node_modules/parse5": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", - "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", - "dev": true, - "dependencies": { - "entities": "^4.4.0" - }, - "funding": { - "url": "https://github.com/inikulin/parse5?sponsor=1" - } - }, - "node_modules/parse5-htmlparser2-tree-adapter": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz", - "integrity": "sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g==", - "dev": true, - "dependencies": { - "domhandler": "^5.0.2", - "parse5": "^7.0.0" - }, - "funding": { - "url": "https://github.com/inikulin/parse5?sponsor=1" - } - }, - "node_modules/path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/pend": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", - "dev": true - }, - "node_modules/prebuild-install": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.1.tgz", - "integrity": "sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw==", - "dev": true, - "dependencies": { - "detect-libc": "^2.0.0", - "expand-template": "^2.0.3", - "github-from-package": "0.0.0", - "minimist": "^1.2.3", - "mkdirp-classic": "^0.5.3", - "napi-build-utils": "^1.0.1", - "node-abi": "^3.3.0", - "pump": "^3.0.0", - "rc": "^1.2.7", - "simple-get": "^4.0.0", - "tar-fs": "^2.0.0", - "tunnel-agent": "^0.6.0" - }, - "bin": { - "prebuild-install": "bin.js" - }, - "engines": { - "node": ">=10" - } - }, - "node_modules/pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "dependencies": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "node_modules/qs": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", - "dev": true, - "dependencies": { - "side-channel": "^1.0.4" - }, - "engines": { - "node": ">=0.6" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "dev": true, - "dependencies": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - }, - "bin": { - "rc": "cli.js" - } - }, - "node_modules/read": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/read/-/read-1.0.7.tgz", - "integrity": "sha512-rSOKNYUmaxy0om1BNjMN4ezNT6VKK+2xF4GBhc81mkH7L60i6dp8qPYrkndNLT3QPphoII3maL9PVC9XmhHwVQ==", - "dev": true, - "dependencies": { - "mute-stream": "~0.0.4" - }, - "engines": { - "node": ">=0.8" - } - }, - "node_modules/readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "dependencies": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - }, - "engines": { - "node": ">= 6" - } - }, - "node_modules/rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "dependencies": { - "glob": "^7.1.3" - }, - "bin": { - "rimraf": "bin.js" - }, - "funding": { - "url": "https://github.com/sponsors/isaacs" - } - }, - "node_modules/safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/sax": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", - "dev": true - }, - "node_modules/semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true, - "bin": { - "semver": "bin/semver" - } - }, - "node_modules/side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "dev": true, - "dependencies": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - }, - "funding": { - "url": "https://github.com/sponsors/ljharb" - } - }, - "node_modules/simple-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", - "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ] - }, - "node_modules/simple-get": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", - "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", - "dev": true, - "funding": [ - { - "type": "github", - "url": "https://github.com/sponsors/feross" - }, - { - "type": "patreon", - "url": "https://www.patreon.com/feross" - }, - { - "type": "consulting", - "url": "https://feross.org/support" - } - ], - "dependencies": { - "decompress-response": "^6.0.0", - "once": "^1.3.1", - "simple-concat": "^1.0.0" - } - }, - "node_modules/string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, - "dependencies": { - "safe-buffer": "~5.2.0" - } - }, - "node_modules/strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", - "dev": true, - "engines": { - "node": ">=0.10.0" - } - }, - "node_modules/supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "dependencies": { - "has-flag": "^3.0.0" - }, - "engines": { - "node": ">=4" - } - }, - "node_modules/tar-fs": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", - "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", - "dev": true, - "dependencies": { - "chownr": "^1.1.1", - "mkdirp-classic": "^0.5.2", - "pump": "^3.0.0", - "tar-stream": "^2.1.4" - } - }, - "node_modules/tar-stream": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", - "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", - "dev": true, - "dependencies": { - "bl": "^4.0.3", - "end-of-stream": "^1.4.1", - "fs-constants": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1" - }, - "engines": { - "node": ">=6" - } - }, - "node_modules/tmp": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", - "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", - "dev": true, - "dependencies": { - "rimraf": "^3.0.0" - }, - "engines": { - "node": ">=8.17.0" - } - }, - "node_modules/tunnel": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", - "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", - "dev": true, - "engines": { - "node": ">=0.6.11 <=0.7.0 || >=0.7.3" - } - }, - "node_modules/tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", - "dev": true, - "dependencies": { - "safe-buffer": "^5.0.1" - }, - "engines": { - "node": "*" - } - }, - "node_modules/typed-rest-client": { - "version": "1.8.9", - "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.9.tgz", - "integrity": "sha512-uSmjE38B80wjL85UFX3sTYEUlvZ1JgCRhsWj/fJ4rZ0FqDUFoIuodtiVeE+cUqiVTOKPdKrp/sdftD15MDek6g==", - "dev": true, - "dependencies": { - "qs": "^6.9.1", - "tunnel": "0.0.6", - "underscore": "^1.12.1" - } - }, - "node_modules/uc.micro": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", - "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==", - "dev": true - }, - "node_modules/underscore": { - "version": "1.13.6", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz", - "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==", - "dev": true - }, - "node_modules/url-join": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz", - "integrity": "sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==", - "dev": true - }, - "node_modules/util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true - }, - "node_modules/vsce": { - "version": "2.15.0", - "resolved": "https://registry.npmjs.org/vsce/-/vsce-2.15.0.tgz", - "integrity": "sha512-P8E9LAZvBCQnoGoizw65JfGvyMqNGlHdlUXD1VAuxtvYAaHBKLBdKPnpy60XKVDAkQCfmMu53g+gq9FM+ydepw==", - "deprecated": "vsce has been renamed to @vscode/vsce. Install using @vscode/vsce instead.", - "dev": true, - "dependencies": { - "azure-devops-node-api": "^11.0.1", - "chalk": "^2.4.2", - "cheerio": "^1.0.0-rc.9", - "commander": "^6.1.0", - "glob": "^7.0.6", - "hosted-git-info": "^4.0.2", - "keytar": "^7.7.0", - "leven": "^3.1.0", - "markdown-it": "^12.3.2", - "mime": "^1.3.4", - "minimatch": "^3.0.3", - "parse-semver": "^1.1.1", - "read": "^1.0.7", - "semver": "^5.1.0", - "tmp": "^0.2.1", - "typed-rest-client": "^1.8.4", - "url-join": "^4.0.1", - "xml2js": "^0.4.23", - "yauzl": "^2.3.1", - "yazl": "^2.2.2" - }, - "bin": { - "vsce": "vsce" - }, - "engines": { - "node": ">= 14" - } - }, - "node_modules/wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true - }, - "node_modules/xml2js": { - "version": "0.4.23", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz", - "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", - "dev": true, - "dependencies": { - "sax": ">=0.6.0", - "xmlbuilder": "~11.0.0" - }, - "engines": { - "node": ">=4.0.0" - } - }, - "node_modules/xmlbuilder": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", - "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", - "dev": true, - "engines": { - "node": ">=4.0" - } - }, - "node_modules/yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "node_modules/yauzl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", - "dev": true, - "dependencies": { - "buffer-crc32": "~0.2.3", - "fd-slicer": "~1.1.0" - } - }, - "node_modules/yazl": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/yazl/-/yazl-2.5.1.tgz", - "integrity": "sha512-phENi2PLiHnHb6QBVot+dJnaAZ0xosj7p3fWl+znIjBDlnMI2PsZCJZ306BPTFOaHf5qdDEI8x5qFrSOBN5vrw==", - "dev": true, - "dependencies": { - "buffer-crc32": "~0.2.3" - } - } - }, - "dependencies": { - "ansi-styles": { - "version": "3.2.1", - "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-3.2.1.tgz", - "integrity": "sha512-VT0ZI6kZRdTh8YyJw3SMbYm/u+NqfsAxEpWO0Pf9sq8/e94WxxOpPKx9FR1FlyCtOVDNOQ+8ntlqFxiRc+r5qA==", - "dev": true, - "requires": { - "color-convert": "^1.9.0" - } - }, - "argparse": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/argparse/-/argparse-2.0.1.tgz", - "integrity": "sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q==", - "dev": true - }, - "azure-devops-node-api": { - "version": "11.2.0", - "resolved": "https://registry.npmjs.org/azure-devops-node-api/-/azure-devops-node-api-11.2.0.tgz", - "integrity": "sha512-XdiGPhrpaT5J8wdERRKs5g8E0Zy1pvOYTli7z9E8nmOn3YGp4FhtjhrOyFmX/8veWCwdI69mCHKJw6l+4J/bHA==", - "dev": true, - "requires": { - "tunnel": "0.0.6", - "typed-rest-client": "^1.8.4" - } - }, - "balanced-match": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", - "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==", - "dev": true - }, - "base64-js": { - "version": "1.5.1", - "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", - "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", - "dev": true - }, - "bl": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", - "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", - "dev": true, - "requires": { - "buffer": "^5.5.0", - "inherits": "^2.0.4", - "readable-stream": "^3.4.0" - } - }, - "boolbase": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/boolbase/-/boolbase-1.0.0.tgz", - "integrity": "sha512-JZOSA7Mo9sNGB8+UjSgzdLtokWAky1zbztM3WRLCbZ70/3cTANmQmOdR7y2g+J0e2WXywy1yS468tY+IruqEww==", - "dev": true - }, - "brace-expansion": { - "version": "1.1.11", - "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz", - "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==", - "dev": true, - "requires": { - "balanced-match": "^1.0.0", - "concat-map": "0.0.1" - } - }, - "buffer": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", - "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", - "dev": true, - "requires": { - "base64-js": "^1.3.1", - "ieee754": "^1.1.13" - } - }, - "buffer-crc32": { - "version": "0.2.13", - "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", - "integrity": "sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==", - "dev": true - }, - "call-bind": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz", - "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==", - "dev": true, - "requires": { - "function-bind": "^1.1.1", - "get-intrinsic": "^1.0.2" - } - }, - "chalk": { - "version": "2.4.2", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-2.4.2.tgz", - "integrity": "sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ==", - "dev": true, - "requires": { - "ansi-styles": "^3.2.1", - "escape-string-regexp": "^1.0.5", - "supports-color": "^5.3.0" - } - }, - "cheerio": { - "version": "1.0.0-rc.12", - "resolved": "https://registry.npmjs.org/cheerio/-/cheerio-1.0.0-rc.12.tgz", - "integrity": "sha512-VqR8m68vM46BNnuZ5NtnGBKIE/DfN0cRIzg9n40EIq9NOv90ayxLBXA8fXC5gquFRGJSTRqBq25Jt2ECLR431Q==", - "dev": true, - "requires": { - "cheerio-select": "^2.1.0", - "dom-serializer": "^2.0.0", - "domhandler": "^5.0.3", - "domutils": "^3.0.1", - "htmlparser2": "^8.0.1", - "parse5": "^7.0.0", - "parse5-htmlparser2-tree-adapter": "^7.0.0" - } - }, - "cheerio-select": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/cheerio-select/-/cheerio-select-2.1.0.tgz", - "integrity": "sha512-9v9kG0LvzrlcungtnJtpGNxY+fzECQKhK4EGJX2vByejiMX84MFNQw4UxPJl3bFbTMw+Dfs37XaIkCwTZfLh4g==", - "dev": true, - "requires": { - "boolbase": "^1.0.0", - "css-select": "^5.1.0", - "css-what": "^6.1.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.3", - "domutils": "^3.0.1" - } - }, - "chownr": { - "version": "1.1.4", - "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", - "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", - "dev": true - }, - "color-convert": { - "version": "1.9.3", - "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-1.9.3.tgz", - "integrity": "sha512-QfAUtd+vFdAtFQcC8CCyYt1fYWxSqAiK2cSD6zDB8N3cpsEBAvRxp9zOGg6G/SHHJYAT88/az/IuDGALsNVbGg==", - "dev": true, - "requires": { - "color-name": "1.1.3" - } - }, - "color-name": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz", - "integrity": "sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw==", - "dev": true - }, - "commander": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/commander/-/commander-6.2.1.tgz", - "integrity": "sha512-U7VdrJFnJgo4xjrHpTzu0yrHPGImdsmD95ZlgYSEajAn2JKzDhDTPG9kBTefmObL2w/ngeZnilk+OV9CG3d7UA==", - "dev": true - }, - "concat-map": { - "version": "0.0.1", - "resolved": "https://registry.npmjs.org/concat-map/-/concat-map-0.0.1.tgz", - "integrity": "sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==", - "dev": true - }, - "css-select": { - "version": "5.1.0", - "resolved": "https://registry.npmjs.org/css-select/-/css-select-5.1.0.tgz", - "integrity": "sha512-nwoRF1rvRRnnCqqY7updORDsuqKzqYJ28+oSMaJMMgOauh3fvwHqMS7EZpIPqK8GL+g9mKxF1vP/ZjSeNjEVHg==", - "dev": true, - "requires": { - "boolbase": "^1.0.0", - "css-what": "^6.1.0", - "domhandler": "^5.0.2", - "domutils": "^3.0.1", - "nth-check": "^2.0.1" - } - }, - "css-what": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/css-what/-/css-what-6.1.0.tgz", - "integrity": "sha512-HTUrgRJ7r4dsZKU6GjmpfRK1O76h97Z8MfS1G0FozR+oF2kG6Vfe8JE6zwrkbxigziPHinCJ+gCPjA9EaBDtRw==", - "dev": true - }, - "decompress-response": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", - "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", - "dev": true, - "requires": { - "mimic-response": "^3.1.0" - } - }, - "deep-extend": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", - "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", - "dev": true - }, - "detect-libc": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.1.tgz", - "integrity": "sha512-463v3ZeIrcWtdgIg6vI6XUncguvr2TnGl4SzDXinkt9mSLpBJKXT3mW6xT3VQdDN11+WVs29pgvivTc4Lp8v+w==", - "dev": true - }, - "dom-serializer": { - "version": "2.0.0", - "resolved": "https://registry.npmjs.org/dom-serializer/-/dom-serializer-2.0.0.tgz", - "integrity": "sha512-wIkAryiqt/nV5EQKqQpo3SToSOV9J0DnbJqwK7Wv/Trc92zIAYZ4FlMu+JPFW1DfGFt81ZTCGgDEabffXeLyJg==", - "dev": true, - "requires": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.2", - "entities": "^4.2.0" - } - }, - "domelementtype": { - "version": "2.3.0", - "resolved": "https://registry.npmjs.org/domelementtype/-/domelementtype-2.3.0.tgz", - "integrity": "sha512-OLETBj6w0OsagBwdXnPdN0cnMfF9opN69co+7ZrbfPGrdpPVNBUj02spi6B1N7wChLQiPn4CSH/zJvXw56gmHw==", - "dev": true - }, - "domhandler": { - "version": "5.0.3", - "resolved": "https://registry.npmjs.org/domhandler/-/domhandler-5.0.3.tgz", - "integrity": "sha512-cgwlv/1iFQiFnU96XXgROh8xTeetsnJiDsTc7TYCLFd9+/WNkIqPTxiM/8pSd8VIrhXGTf1Ny1q1hquVqDJB5w==", - "dev": true, - "requires": { - "domelementtype": "^2.3.0" - } - }, - "domutils": { - "version": "3.0.1", - "resolved": "https://registry.npmjs.org/domutils/-/domutils-3.0.1.tgz", - "integrity": "sha512-z08c1l761iKhDFtfXO04C7kTdPBLi41zwOZl00WS8b5eiaebNpY00HKbztwBq+e3vyqWNwWF3mP9YLUeqIrF+Q==", - "dev": true, - "requires": { - "dom-serializer": "^2.0.0", - "domelementtype": "^2.3.0", - "domhandler": "^5.0.1" - } - }, - "end-of-stream": { - "version": "1.4.4", - "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.4.tgz", - "integrity": "sha512-+uw1inIHVPQoaVuHzRyXd21icM+cnt4CzD5rW+NC1wjOUSTOs+Te7FOv7AhN7vS9x/oIyhLP5PR1H+phQAHu5Q==", - "dev": true, - "requires": { - "once": "^1.4.0" - } - }, - "entities": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-4.4.0.tgz", - "integrity": "sha512-oYp7156SP8LkeGD0GF85ad1X9Ai79WtRsZ2gxJqtBuzH+98YUV6jkHEKlZkMbcrjJjIVJNIDP/3WL9wQkoPbWA==", - "dev": true - }, - "escape-string-regexp": { - "version": "1.0.5", - "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz", - "integrity": "sha512-vbRorB5FUQWvla16U8R/qgaFIya2qGzwDrNmCZuYKrbdSUMG6I1ZCGQRefkRVhuOkIGVne7BQ35DSfo1qvJqFg==", - "dev": true - }, - "expand-template": { - "version": "2.0.3", - "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", - "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", - "dev": true - }, - "fd-slicer": { - "version": "1.1.0", - "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", - "integrity": "sha512-cE1qsB/VwyQozZ+q1dGxR8LBYNZeofhEdUNGSMbQD3Gw2lAzX9Zb3uIU6Ebc/Fmyjo9AWWfnn0AUCHqtevs/8g==", - "dev": true, - "requires": { - "pend": "~1.2.0" - } - }, - "fs-constants": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", - "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", - "dev": true - }, - "fs.realpath": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", - "integrity": "sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw==", - "dev": true - }, - "function-bind": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.1.tgz", - "integrity": "sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A==", - "dev": true - }, - "get-intrinsic": { - "version": "1.1.3", - "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.1.3.tgz", - "integrity": "sha512-QJVz1Tj7MS099PevUG5jvnt9tSkXN8K14dxQlikJuPt4uD9hHAHjLyLBiLR5zELelBdD9QNRAXZzsJx0WaDL9A==", - "dev": true, - "requires": { - "function-bind": "^1.1.1", - "has": "^1.0.3", - "has-symbols": "^1.0.3" - } - }, - "github-from-package": { - "version": "0.0.0", - "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", - "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==", - "dev": true - }, - "glob": { - "version": "7.2.3", - "resolved": "https://registry.npmjs.org/glob/-/glob-7.2.3.tgz", - "integrity": "sha512-nFR0zLpU2YCaRxwoCJvL6UvCH2JFyFVIvwTLsIf21AuHlMskA1hhTdk+LlYJtOlYt9v6dvszD2BGRqBL+iQK9Q==", - "dev": true, - "requires": { - "fs.realpath": "^1.0.0", - "inflight": "^1.0.4", - "inherits": "2", - "minimatch": "^3.1.1", - "once": "^1.3.0", - "path-is-absolute": "^1.0.0" - } - }, - "has": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has/-/has-1.0.3.tgz", - "integrity": "sha512-f2dvO0VU6Oej7RkWJGrehjbzMAjFp5/VKPp5tTpWIV4JHHZK1/BxbFRtf/siA2SWTe09caDmVtYYzWEIbBS4zw==", - "dev": true, - "requires": { - "function-bind": "^1.1.1" - } - }, - "has-flag": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-3.0.0.tgz", - "integrity": "sha512-sKJf1+ceQBr4SMkvQnBDNDtf4TXpVhVGateu0t918bl30FnbE2m4vNLX+VWe/dpjlb+HugGYzW7uQXH98HPEYw==", - "dev": true - }, - "has-symbols": { - "version": "1.0.3", - "resolved": "https://registry.npmjs.org/has-symbols/-/has-symbols-1.0.3.tgz", - "integrity": "sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==", - "dev": true - }, - "hosted-git-info": { - "version": "4.1.0", - "resolved": "https://registry.npmjs.org/hosted-git-info/-/hosted-git-info-4.1.0.tgz", - "integrity": "sha512-kyCuEOWjJqZuDbRHzL8V93NzQhwIB71oFWSyzVo+KPZI+pnQPPxucdkrOZvkLRnrf5URsQM+IJ09Dw29cRALIA==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - }, - "htmlparser2": { - "version": "8.0.1", - "resolved": "https://registry.npmjs.org/htmlparser2/-/htmlparser2-8.0.1.tgz", - "integrity": "sha512-4lVbmc1diZC7GUJQtRQ5yBAeUCL1exyMwmForWkRLnwyzWBFxN633SALPMGYaWZvKe9j1pRZJpauvmxENSp/EA==", - "dev": true, - "requires": { - "domelementtype": "^2.3.0", - "domhandler": "^5.0.2", - "domutils": "^3.0.1", - "entities": "^4.3.0" - } - }, - "ieee754": { - "version": "1.2.1", - "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", - "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", - "dev": true - }, - "inflight": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/inflight/-/inflight-1.0.6.tgz", - "integrity": "sha512-k92I/b08q4wvFscXCLvqfsHCrjrF7yiXsQuIVvVE7N82W3+aqpzuUdBbfhWcy/FZR3/4IgflMgKLOsvPDrGCJA==", - "dev": true, - "requires": { - "once": "^1.3.0", - "wrappy": "1" - } - }, - "inherits": { - "version": "2.0.4", - "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", - "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", - "dev": true - }, - "ini": { - "version": "1.3.8", - "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", - "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", - "dev": true - }, - "keytar": { - "version": "7.9.0", - "resolved": "https://registry.npmjs.org/keytar/-/keytar-7.9.0.tgz", - "integrity": "sha512-VPD8mtVtm5JNtA2AErl6Chp06JBfy7diFQ7TQQhdpWOl6MrCRB+eRbvAZUsbGQS9kiMq0coJsy0W0vHpDCkWsQ==", - "dev": true, - "requires": { - "node-addon-api": "^4.3.0", - "prebuild-install": "^7.0.1" - } - }, - "leven": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/leven/-/leven-3.1.0.tgz", - "integrity": "sha512-qsda+H8jTaUaN/x5vzW2rzc+8Rw4TAQ/4KjB46IwK5VH+IlVeeeje/EoZRpiXvIqjFgK84QffqPztGI3VBLG1A==", - "dev": true - }, - "linkify-it": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/linkify-it/-/linkify-it-3.0.3.tgz", - "integrity": "sha512-ynTsyrFSdE5oZ/O9GEf00kPngmOfVwazR5GKDq6EYfhlpFug3J2zybX56a2PRRpc9P+FuSoGNAwjlbDs9jJBPQ==", - "dev": true, - "requires": { - "uc.micro": "^1.0.1" - } - }, - "lru-cache": { - "version": "6.0.0", - "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-6.0.0.tgz", - "integrity": "sha512-Jo6dJ04CmSjuznwJSS3pUeWmd/H0ffTlkXXgwZi+eq1UCmqQwCh+eLsYOYCwY991i2Fah4h1BEMCx4qThGbsiA==", - "dev": true, - "requires": { - "yallist": "^4.0.0" - } - }, - "markdown-it": { - "version": "12.3.2", - "resolved": "https://registry.npmjs.org/markdown-it/-/markdown-it-12.3.2.tgz", - "integrity": "sha512-TchMembfxfNVpHkbtriWltGWc+m3xszaRD0CZup7GFFhzIgQqxIfn3eGj1yZpfuflzPvfkt611B2Q/Bsk1YnGg==", - "dev": true, - "requires": { - "argparse": "^2.0.1", - "entities": "~2.1.0", - "linkify-it": "^3.0.1", - "mdurl": "^1.0.1", - "uc.micro": "^1.0.5" - }, - "dependencies": { - "entities": { - "version": "2.1.0", - "resolved": "https://registry.npmjs.org/entities/-/entities-2.1.0.tgz", - "integrity": "sha512-hCx1oky9PFrJ611mf0ifBLBRW8lUUVRlFolb5gWRfIELabBlbp9xZvrqZLZAs+NxFnbfQoeGd8wDkygjg7U85w==", - "dev": true - } - } - }, - "mdurl": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/mdurl/-/mdurl-1.0.1.tgz", - "integrity": "sha512-/sKlQJCBYVY9Ers9hqzKou4H6V5UWc/M59TH2dvkt+84itfnq7uFOMLpOiOS4ujvHP4etln18fmIxA5R5fll0g==", - "dev": true - }, - "mime": { - "version": "1.6.0", - "resolved": "https://registry.npmjs.org/mime/-/mime-1.6.0.tgz", - "integrity": "sha512-x0Vn8spI+wuJ1O6S7gnbaQg8Pxh4NNHb7KSINmEWKiPE4RKOplvijn+NkmYmmRgP68mc70j2EbeTFRsrswaQeg==", - "dev": true - }, - "mimic-response": { - "version": "3.1.0", - "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", - "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", - "dev": true - }, - "minimatch": { - "version": "3.1.2", - "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", - "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==", - "dev": true, - "requires": { - "brace-expansion": "^1.1.7" - } - }, - "minimist": { - "version": "1.2.7", - "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.7.tgz", - "integrity": "sha512-bzfL1YUZsP41gmu/qjrEk0Q6i2ix/cVeAhbCbqH9u3zYutS1cLg00qhrD0M2MVdCcx4Sc0UpP2eBWo9rotpq6g==", - "dev": true - }, - "mkdirp-classic": { - "version": "0.5.3", - "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", - "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", - "dev": true - }, - "mute-stream": { - "version": "0.0.8", - "resolved": "https://registry.npmjs.org/mute-stream/-/mute-stream-0.0.8.tgz", - "integrity": "sha512-nnbWWOkoWyUsTjKrhgD0dcz22mdkSnpYqbEjIm2nhwhuxlSkpywJmBo8h0ZqJdkp73mb90SssHkN4rsRaBAfAA==", - "dev": true - }, - "napi-build-utils": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-1.0.2.tgz", - "integrity": "sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==", - "dev": true - }, - "node-abi": { - "version": "3.30.0", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.30.0.tgz", - "integrity": "sha512-qWO5l3SCqbwQavymOmtTVuCWZE23++S+rxyoHjXqUmPyzRcaoI4lA2gO55/drddGnedAyjA7sk76SfQ5lfUMnw==", - "dev": true, - "requires": { - "semver": "^7.3.5" - }, - "dependencies": { - "semver": { - "version": "7.3.8", - "resolved": "https://registry.npmjs.org/semver/-/semver-7.3.8.tgz", - "integrity": "sha512-NB1ctGL5rlHrPJtFDVIVzTyQylMLu9N9VICA6HSFJo8MCGVTMW6gfpicwKmmK/dAjTOrqu5l63JJOpDSrAis3A==", - "dev": true, - "requires": { - "lru-cache": "^6.0.0" - } - } - } - }, - "node-addon-api": { - "version": "4.3.0", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-4.3.0.tgz", - "integrity": "sha512-73sE9+3UaLYYFmDsFZnqCInzPyh3MqIwZO9cw58yIqAZhONrrabrYyYe3TuIqtIiOuTXVhsGau8hcrhhwSsDIQ==", - "dev": true - }, - "nth-check": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/nth-check/-/nth-check-2.1.1.tgz", - "integrity": "sha512-lqjrjmaOoAnWfMmBPL+XNnynZh2+swxiX3WUE0s4yEHI6m+AwrK2UZOimIRl3X/4QctVqS8AiZjFqyOGrMXb/w==", - "dev": true, - "requires": { - "boolbase": "^1.0.0" - } - }, - "object-inspect": { - "version": "1.12.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.12.2.tgz", - "integrity": "sha512-z+cPxW0QGUp0mcqcsgQyLVRDoXFQbXOwBaqyF7VIgI4TWNQsDHrBpUQslRmIfAoYWdYzs6UlKJtB2XJpTaNSpQ==", - "dev": true - }, - "once": { - "version": "1.4.0", - "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", - "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", - "dev": true, - "requires": { - "wrappy": "1" - } - }, - "parse-semver": { - "version": "1.1.1", - "resolved": "https://registry.npmjs.org/parse-semver/-/parse-semver-1.1.1.tgz", - "integrity": "sha512-Eg1OuNntBMH0ojvEKSrvDSnwLmvVuUOSdylH/pSCPNMIspLlweJyIWXCE+k/5hm3cj/EBUYwmWkjhBALNP4LXQ==", - "dev": true, - "requires": { - "semver": "^5.1.0" - } - }, - "parse5": { - "version": "7.1.2", - "resolved": "https://registry.npmjs.org/parse5/-/parse5-7.1.2.tgz", - "integrity": "sha512-Czj1WaSVpaoj0wbhMzLmWD69anp2WH7FXMB9n1Sy8/ZFF9jolSQVMu1Ij5WIyGmcBmhk7EOndpO4mIpihVqAXw==", - "dev": true, - "requires": { - "entities": "^4.4.0" - } - }, - "parse5-htmlparser2-tree-adapter": { - "version": "7.0.0", - "resolved": "https://registry.npmjs.org/parse5-htmlparser2-tree-adapter/-/parse5-htmlparser2-tree-adapter-7.0.0.tgz", - "integrity": "sha512-B77tOZrqqfUfnVcOrUvfdLbz4pu4RopLD/4vmu3HUPswwTA8OH0EMW9BlWR2B0RCoiZRAHEUu7IxeP1Pd1UU+g==", - "dev": true, - "requires": { - "domhandler": "^5.0.2", - "parse5": "^7.0.0" - } - }, - "path-is-absolute": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/path-is-absolute/-/path-is-absolute-1.0.1.tgz", - "integrity": "sha512-AVbw3UJ2e9bq64vSaS9Am0fje1Pa8pbGqTTsmXfaIiMpnr5DlDhfJOuLj9Sf95ZPVDAUerDfEk88MPmPe7UCQg==", - "dev": true - }, - "pend": { - "version": "1.2.0", - "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", - "integrity": "sha512-F3asv42UuXchdzt+xXqfW1OGlVBe+mxa2mqI0pg5yAHZPvFmY3Y6drSf/GQ1A86WgWEN9Kzh/WrgKa6iGcHXLg==", - "dev": true - }, - "prebuild-install": { - "version": "7.1.1", - "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.1.tgz", - "integrity": "sha512-jAXscXWMcCK8GgCoHOfIr0ODh5ai8mj63L2nWrjuAgXE6tDyYGnx4/8o/rCgU+B4JSyZBKbeZqzhtwtC3ovxjw==", - "dev": true, - "requires": { - "detect-libc": "^2.0.0", - "expand-template": "^2.0.3", - "github-from-package": "0.0.0", - "minimist": "^1.2.3", - "mkdirp-classic": "^0.5.3", - "napi-build-utils": "^1.0.1", - "node-abi": "^3.3.0", - "pump": "^3.0.0", - "rc": "^1.2.7", - "simple-get": "^4.0.0", - "tar-fs": "^2.0.0", - "tunnel-agent": "^0.6.0" - } - }, - "pump": { - "version": "3.0.0", - "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.0.tgz", - "integrity": "sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==", - "dev": true, - "requires": { - "end-of-stream": "^1.1.0", - "once": "^1.3.1" - } - }, - "qs": { - "version": "6.11.0", - "resolved": "https://registry.npmjs.org/qs/-/qs-6.11.0.tgz", - "integrity": "sha512-MvjoMCJwEarSbUYk5O+nmoSzSutSsTwF85zcHPQ9OrlFoZOYIjaqBAJIqIXjptyD5vThxGq52Xu/MaJzRkIk4Q==", - "dev": true, - "requires": { - "side-channel": "^1.0.4" - } - }, - "rc": { - "version": "1.2.8", - "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", - "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", - "dev": true, - "requires": { - "deep-extend": "^0.6.0", - "ini": "~1.3.0", - "minimist": "^1.2.0", - "strip-json-comments": "~2.0.1" - } - }, - "read": { - "version": "1.0.7", - "resolved": "https://registry.npmjs.org/read/-/read-1.0.7.tgz", - "integrity": "sha512-rSOKNYUmaxy0om1BNjMN4ezNT6VKK+2xF4GBhc81mkH7L60i6dp8qPYrkndNLT3QPphoII3maL9PVC9XmhHwVQ==", - "dev": true, - "requires": { - "mute-stream": "~0.0.4" - } - }, - "readable-stream": { - "version": "3.6.0", - "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.0.tgz", - "integrity": "sha512-BViHy7LKeTz4oNnkcLJ+lVSL6vpiFeX6/d3oSH8zCW7UxP2onchk+vTGB143xuFjHS3deTgkKoXXymXqymiIdA==", - "dev": true, - "requires": { - "inherits": "^2.0.3", - "string_decoder": "^1.1.1", - "util-deprecate": "^1.0.1" - } - }, - "rimraf": { - "version": "3.0.2", - "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", - "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", - "dev": true, - "requires": { - "glob": "^7.1.3" - } - }, - "safe-buffer": { - "version": "5.2.1", - "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", - "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", - "dev": true - }, - "sax": { - "version": "1.2.4", - "resolved": "https://registry.npmjs.org/sax/-/sax-1.2.4.tgz", - "integrity": "sha512-NqVDv9TpANUjFm0N8uM5GxL36UgKi9/atZw+x7YFnQ8ckwFGKrl4xX4yWtrey3UJm5nP1kUbnYgLopqWNSRhWw==", - "dev": true - }, - "semver": { - "version": "5.7.1", - "resolved": "https://registry.npmjs.org/semver/-/semver-5.7.1.tgz", - "integrity": "sha512-sauaDf/PZdVgrLTNYHRtpXa1iRiKcaebiKQ1BJdpQlWH2lCvexQdX55snPFyK7QzpudqbCI0qXFfOasHdyNDGQ==", - "dev": true - }, - "side-channel": { - "version": "1.0.4", - "resolved": "https://registry.npmjs.org/side-channel/-/side-channel-1.0.4.tgz", - "integrity": "sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==", - "dev": true, - "requires": { - "call-bind": "^1.0.0", - "get-intrinsic": "^1.0.2", - "object-inspect": "^1.9.0" - } - }, - "simple-concat": { - "version": "1.0.1", - "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", - "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", - "dev": true - }, - "simple-get": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", - "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", - "dev": true, - "requires": { - "decompress-response": "^6.0.0", - "once": "^1.3.1", - "simple-concat": "^1.0.0" - } - }, - "string_decoder": { - "version": "1.3.0", - "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", - "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", - "dev": true, - "requires": { - "safe-buffer": "~5.2.0" - } - }, - "strip-json-comments": { - "version": "2.0.1", - "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", - "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", - "dev": true - }, - "supports-color": { - "version": "5.5.0", - "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-5.5.0.tgz", - "integrity": "sha512-QjVjwdXIt408MIiAqCX4oUKsgU2EqAGzs2Ppkm4aQYbjm+ZEWEcW4SfFNTr4uMNZma0ey4f5lgLrkB0aX0QMow==", - "dev": true, - "requires": { - "has-flag": "^3.0.0" - } - }, - "tar-fs": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.1.tgz", - "integrity": "sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==", - "dev": true, - "requires": { - "chownr": "^1.1.1", - "mkdirp-classic": "^0.5.2", - "pump": "^3.0.0", - "tar-stream": "^2.1.4" - } - }, - "tar-stream": { - "version": "2.2.0", - "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", - "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", - "dev": true, - "requires": { - "bl": "^4.0.3", - "end-of-stream": "^1.4.1", - "fs-constants": "^1.0.0", - "inherits": "^2.0.3", - "readable-stream": "^3.1.1" - } - }, - "tmp": { - "version": "0.2.1", - "resolved": "https://registry.npmjs.org/tmp/-/tmp-0.2.1.tgz", - "integrity": "sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==", - "dev": true, - "requires": { - "rimraf": "^3.0.0" - } - }, - "tunnel": { - "version": "0.0.6", - "resolved": "https://registry.npmjs.org/tunnel/-/tunnel-0.0.6.tgz", - "integrity": "sha512-1h/Lnq9yajKY2PEbBadPXj3VxsDDu844OnaAo52UVmIzIvwwtBPIuNvkjuzBlTWpfJyUbG3ez0KSBibQkj4ojg==", - "dev": true - }, - "tunnel-agent": { - "version": "0.6.0", - "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", - "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", - "dev": true, - "requires": { - "safe-buffer": "^5.0.1" - } - }, - "typed-rest-client": { - "version": "1.8.9", - "resolved": "https://registry.npmjs.org/typed-rest-client/-/typed-rest-client-1.8.9.tgz", - "integrity": "sha512-uSmjE38B80wjL85UFX3sTYEUlvZ1JgCRhsWj/fJ4rZ0FqDUFoIuodtiVeE+cUqiVTOKPdKrp/sdftD15MDek6g==", - "dev": true, - "requires": { - "qs": "^6.9.1", - "tunnel": "0.0.6", - "underscore": "^1.12.1" - } - }, - "uc.micro": { - "version": "1.0.6", - "resolved": "https://registry.npmjs.org/uc.micro/-/uc.micro-1.0.6.tgz", - "integrity": "sha512-8Y75pvTYkLJW2hWQHXxoqRgV7qb9B+9vFEtidML+7koHUFapnVJAZ6cKs+Qjz5Aw3aZWHMC6u0wJE3At+nSGwA==", - "dev": true - }, - "underscore": { - "version": "1.13.6", - "resolved": "https://registry.npmjs.org/underscore/-/underscore-1.13.6.tgz", - "integrity": "sha512-+A5Sja4HP1M08MaXya7p5LvjuM7K6q/2EaC0+iovj/wOcMsTzMvDFbasi/oSapiwOlt252IqsKqPjCl7huKS0A==", - "dev": true - }, - "url-join": { - "version": "4.0.1", - "resolved": "https://registry.npmjs.org/url-join/-/url-join-4.0.1.tgz", - "integrity": "sha512-jk1+QP6ZJqyOiuEI9AEWQfju/nB2Pw466kbA0LEZljHwKeMgd9WrAEgEGxjPDD2+TNbbb37rTyhEfrCXfuKXnA==", - "dev": true - }, - "util-deprecate": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", - "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", - "dev": true - }, - "vsce": { - "version": "2.15.0", - "resolved": "https://registry.npmjs.org/vsce/-/vsce-2.15.0.tgz", - "integrity": "sha512-P8E9LAZvBCQnoGoizw65JfGvyMqNGlHdlUXD1VAuxtvYAaHBKLBdKPnpy60XKVDAkQCfmMu53g+gq9FM+ydepw==", - "dev": true, - "requires": { - "azure-devops-node-api": "^11.0.1", - "chalk": "^2.4.2", - "cheerio": "^1.0.0-rc.9", - "commander": "^6.1.0", - "glob": "^7.0.6", - "hosted-git-info": "^4.0.2", - "keytar": "^7.7.0", - "leven": "^3.1.0", - "markdown-it": "^12.3.2", - "mime": "^1.3.4", - "minimatch": "^3.0.3", - "parse-semver": "^1.1.1", - "read": "^1.0.7", - "semver": "^5.1.0", - "tmp": "^0.2.1", - "typed-rest-client": "^1.8.4", - "url-join": "^4.0.1", - "xml2js": "^0.4.23", - "yauzl": "^2.3.1", - "yazl": "^2.2.2" - } - }, - "wrappy": { - "version": "1.0.2", - "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", - "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", - "dev": true - }, - "xml2js": { - "version": "0.4.23", - "resolved": "https://registry.npmjs.org/xml2js/-/xml2js-0.4.23.tgz", - "integrity": "sha512-ySPiMjM0+pLDftHgXY4By0uswI3SPKLDw/i3UXbnO8M/p28zqexCUoPmQFrYD+/1BzhGJSs2i1ERWKJAtiLrug==", - "dev": true, - "requires": { - "sax": ">=0.6.0", - "xmlbuilder": "~11.0.0" - } - }, - "xmlbuilder": { - "version": "11.0.1", - "resolved": "https://registry.npmjs.org/xmlbuilder/-/xmlbuilder-11.0.1.tgz", - "integrity": "sha512-fDlsI/kFEx7gLvbecc0/ohLG50fugQp8ryHzMTuW9vSa1GJ0XYWKnhsUx7oie3G98+r56aTQIUB4kht42R3JvA==", - "dev": true - }, - "yallist": { - "version": "4.0.0", - "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", - "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", - "dev": true - }, - "yauzl": { - "version": "2.10.0", - "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", - "integrity": "sha512-p4a9I6X6nu6IhoGmBqAcbJy1mlC4j27vEPZX9F4L4/vZT3Lyq1VkFHw/V/PUcB9Buo+DG3iHkT0x3Qya58zc3g==", - "dev": true, - "requires": { - "buffer-crc32": "~0.2.3", - "fd-slicer": "~1.1.0" - } - }, - "yazl": { - "version": "2.5.1", - "resolved": "https://registry.npmjs.org/yazl/-/yazl-2.5.1.tgz", - "integrity": "sha512-phENi2PLiHnHb6QBVot+dJnaAZ0xosj7p3fWl+znIjBDlnMI2PsZCJZ306BPTFOaHf5qdDEI8x5qFrSOBN5vrw==", - "dev": true, - "requires": { - "buffer-crc32": "~0.2.3" - } - } - } -} diff --git a/ext/package.json b/ext/package.json deleted file mode 100644 index 5a14b4f..0000000 --- a/ext/package.json +++ /dev/null @@ -1,39 +0,0 @@ -{ - "name": "sloth-lang", - "displayName": "Sloth Lang", - "description": "Language support for Sloth", - "version": "0.0.1", - "engines": { - "vscode": "^1.22.0" - }, - "categories": [ - "Programming Languages" - ], - "contributes": { - "languages": [ - { - "id": "sloth", - "aliases": [ - "sloth" - ], - "extensions": [ - ".sloth" - ], - "configuration": "./language-configuration.json" - } - ], - "grammars": [ - { - "language": "sloth", - "scopeName": "source.sloth", - "path": "./syntaxes/sloth.tmLanguage.json" - } - ] - }, - "devDependencies": { - "vsce": "^2.15.0" - }, - "scripts": { - "package": "vsce package" - } -} diff --git a/ext/syntaxes/sloth.tmLanguage.json b/ext/syntaxes/sloth.tmLanguage.json deleted file mode 100644 index c5cd3db..0000000 --- a/ext/syntaxes/sloth.tmLanguage.json +++ /dev/null @@ -1,97 +0,0 @@ -{ - "scopeName": "source.sloth", - "patterns": [ - { "include": "#comments" }, - { "include": "#literals" }, - { "include": "#types" }, - { "include": "#decorator" } - ], - "repository": { - "literals": { - "patterns": [ - { - "match": "(0x[0-9a-fA-F]+|0b[01]+|0o[0-7]+|\\d+)(\\.\\d+)?", - "name": "constant.numeric" - }, - { - "match": "'.'", - "name": "constant.character" - }, - { - "match": "\\\\(u.{4}|\\S)", - "name": "constant.character.escape" - }, - { - "match": "true|false", - "name": "constant.language" - }, - { - "begin": "\"", - "end": "\"", - "name": "string.quoted.double" - }, - { - "begin": "\\s*(/)(?![/*])(?=(?:[^/\\\\\\[]|\\\\.|\\[([^\\]\\\\]|\\\\.)+\\])+/(?![/*])[gimy]*(?!\\s*[a-zA-Z0-9_$]))", - "end": "(? - GtGt, // >> - GtEq, // >= - - Comma, - - Question, // ? - QuestionDot, // ?. - QuestionQuestion, // ?? - Dot, // . - DotDot, // .. - - Colon, // : - ColonColon, // :: - SemiColon, // ; - - Arrow, // -> - - // Keywords - Val, - Var, - - Fn, - - If, - Else, - - While, - For, - In, - - Loop, - Break, - Continue, - - As, - - // Misc - Literal(Literal), -} - -#[derive(Debug, Clone, Eq, PartialEq)] -pub enum Literal { - Numeric, - Boolean, - Character, - String, - Regex, -} - -#[derive(Debug, Default)] -pub struct Location { - row: u32, - column: u32, -} - -#[derive(Debug)] -pub struct Token<'a> { - pub tt: TokenType, - pub lexeme: &'a str, - - start: Location, - end: Location, -} - -pub struct Lexer<'a> { - source: &'a [u8], - - start: Location, - end: Location, -} - -impl<'a> Lexer<'a> { - fn new(source: &'a str) -> Self { - Self { - source: source.as_bytes(), - start: Default::default(), - end: Default::default(), - } - } -} - -impl<'a> Iterator for Lexer<'a> { - type Item = Token<'a>; - - fn next(&mut self) -> Option { - unimplemented!() - } -} - -#[cfg(test)] -mod tests { - #[test] - fn basic_test_a() { - // - } -} diff --git a/src/main.rs b/src/main.rs deleted file mode 100644 index 89ce7f9..0000000 --- a/src/main.rs +++ /dev/null @@ -1,32 +0,0 @@ -#![feature(test, let_chains)] -#![warn( - clippy::wildcard_imports, - clippy::string_add, - clippy::string_add_assign, - clippy::manual_ok_or, - unused_lifetimes -)] - -pub mod lexer; - -use std::{env, fs}; - -use itertools::Itertools; - -fn main() { - let args = env::args().collect_vec(); - - if args.len() < 2 { - println!("Sloth programming language interpreter\n"); - println!("Usage: sloth "); - return; - } - - let source_path = &args[1]; - let Ok(_source) = fs::read_to_string(source_path) else { - println!("Error while reading '{source_path}'"); - return; - }; - - // TODO: -} diff --git a/tour/annotations.sloth b/tour/annotations.sloth deleted file mode 100644 index 91e88eb..0000000 --- a/tour/annotations.sloth +++ /dev/null @@ -1,24 +0,0 @@ -# Annotations can be used to provide metadata used by the interpreter or via -# code using reflection (?). -# -# Annotations are scoped with the closest scopes take precedence, so if you -# had a package scoped annotation with strict mode enabled, but then a locally -# scoped annotation on a function with strict mode disabled strict mode would -# be disabled for that function. -# -# Scopes available: -# - package :: the current module and all other modules in the package -# - module :: only the current module -# - local :: only the current scope (default) -# - expr :: only the following expression -@package:name("Example Sloth program"); -@package:author("Cody "); -@package:summary("This program is a little tour de Sloth"); -@package:license("MIT"); - -# Similarly to TypeScript Sloth is a hybrid between a dyncmially typed and -# statically typed language, however if you would like to enforce static typing -# you can enable strict mode. -# -# Using strict mode is required for publishing to canopy. -@package:strict(true); diff --git a/tour/functions.sloth b/tour/functions.sloth deleted file mode 100644 index 529d108..0000000 --- a/tour/functions.sloth +++ /dev/null @@ -1,68 +0,0 @@ -# Types can be inferred. -# If inferrence fails it will be set to "any" unless strict mode is on -pub fn add(lhs, rhs) { - val result = lhs + rhs; - return result; -} - -# ...or manually specified -pub fn mul(lhs: i32, rhs: i32) -> i32 { - val result = lhs * rhs; - return result; -} - -## Docstrings can be used with 2 pound signs -## -## lhs: Left hand side of subtraction -## rhs: Right hand side of subtraction -pub fn sub(lhs: i32, rhs: i32) -> i32 { - val result = lhs - rhs; - return result; -} - -## Fizzbuzz implementation from 1 through 100 -fn fizzbuzz() { - for x in 1..=100 { - val message = match (x % 5, x % 3) { - (0, 0) => "FizzBuzz", - (0, _) => "Fizz", - (_, 0) => "Buzz", - _ => x, - }; - - print(message); - } -} - -## Fizzbuzz implementation using a generator and a range passed into the function -## -## Generator functions are convenient ways to create iterators. Whatever the -## return type is will automatically be wrapped in an Iterator. In the following -## example the function return type would become `Iterator`. -## -## Unlike a normal function you use a yield statement which pauses the function -## call until the next element is requested. Return can still be used in a -## generator function, however it will be used to enact a full stop -generator fn fizzbuzz(range: Range) -> String { - for i in range { - yield match (i % 5, i % 3) { - (0, 0) => "FizzBuzz", - (0, _) => "Fizz", - (_, 0) => "Buzz", - _ => i, - }; - } -} - -fn print_fizzbuzz() { - for message in fizzbuzz(1..=100) { - print(message) - } -} - -pub fn splitting() { - # You are able to call .split and pass in anything that implements Into - "Ylc xsBDSv4e BL5m 1BgDSjv dbQj".split(' '); - "Ylc xsBDSv4e BL5m 1BgDSjv dbQj".split("DS"); - "Ylc xsBDSv4e BL5m 1BgDSjv dbQj".split(/[0-9A-F]{2}/); -} diff --git a/tour/literals.sloth b/tour/literals.sloth deleted file mode 100644 index 53e29cd..0000000 --- a/tour/literals.sloth +++ /dev/null @@ -1,79 +0,0 @@ -# Literals -val number = 85; #TODO: Decide on default integer type -val number = 85.0; # f64 is the default decimal type - -val number: u16 = 27; # If you want more control over memory usage you can specify a integer type -val number: u16 = 27u16; -val number: u16 = 0x1B; -val number: u16 = 0x1Bu16; - -val number: BigInt = BigInt::from(73); #TODO: naming -val number: BigFloat = BigFloat::from(73); #TODO: naming - -val chars: char = ' '; - -val strings: String = "Normal string"; -val strings: String = "Formated strings ${number}"; -val strings: String = """String literals"""; - -val regex: Regex = /[0-9A-F]/; - -val list: List = [1, 2, 3, 2]; -val sets: Set = {1, 2, 3, 2}; - -val maps = { - "foo": 48, - "bar": 97, -}; - -val maps: Map = { - "foo": 48, - "bar": 97, -}; - -# Types can be 'any' and be assigned to anything -var anything: any = "I'm a string right now"; -anything = 53; -anything = "I was a number- but now I'm a string again"; - -# You can use the `is` keyword to check if a type is something -if anything is String { - # Now I can call functions that take a String - anything.split('-'); -} - -# TODO: HMMMMMMM- -if anything is Some(it) {} - -# You can use the `in` keyword to check if something is in a collection -if "hello" in ["hello", "hola"] { - # -} - -# ... or a range -if 5 in 2..17 { - # -} - -# ... or anything that implements Contains -if 'p' in "Apple" {} # impl Contains for String -if "ppl" in "Apple" {} # impl Contains for String -if /[0-9]/ in "24" {} # impl Contains for String - -# `value!` Can be used to bubble up an Option or Result -# `value!!` Can be used to panic on None or Error -# `value?` Can be used to optionally chain -# `value ?: 0` Can be used to provide a default - -maps["foo"] # Option -maps["foo"]!! # 48 - Panics in None case -maps["foo"]! # 48 - Caller of function is responsible for None case -maps["foo"]?.signum() ?? 0 # 1 - Provide a default for None case -maps.keys() # ["foo", "bar"] -maps.values() # [48, 97] - -# Spreading -val lhs = [1, 2, 3]; -val rhs = [4, 5, 6]; -val combined_list = [..lhs, ..rhs, 2, 4, 6]; -val combined_sets = {..lhs, ..rhs, 2, 4, 6}; diff --git a/tour/modules.sloth b/tour/modules.sloth deleted file mode 100644 index b91261e..0000000 --- a/tour/modules.sloth +++ /dev/null @@ -1,82 +0,0 @@ -# Sloth projects are managed completely within their source code. While this -# without a doubt has its downsides it is generally nice as to distribute small -# sloth scripts you only need to distribute the sloth file. No more trying to -# run a script only to find out you need to install multiple 3rd party packages. -# -# As a result of this there needs to be a way in sloth itself to specify -# dependencies, and this is done with the `use extern` statement. -# -# So long as a version is specified and the repository is canopy this is safe -# without a lock file because all packages published on canopy are required to -# specify versions for all dependencies, can not override already published -# versions and can only depend on other packages inside of canopy. -use extern "http"; -use extern "http" as web; -use extern "http:1.0.27"; -use extern "canopy://http:1.0.27"; # Explicitly specify `canopy` protocol. - -# While it is recommended that you only depend on packages from canopy, you can -# use packages from 3rd party sources using git (over https), ftp or https. When -# doing so however you are required to provide a module name with `as`. -# -# Versions can only be specified when using `sloth` or `git` -use extern "git://github.com/CatDevz/AdventOfCode.git" as spookylib; -use extern "ftp://codyq.dev/libs/spookylib.sloth" as spookylib; -use extern "https://codyq.dev/libs/spookylib.sloth" as spookylib; - -# In sloth files will automatically become modules. Files named `mod.sloth` will -# become the module for the directory. If you have a project with multiple files -# the root module will be `mod.sloth`. Anything exposed in this can just strait up -# be used. -# -# If no `mod.sloth` exists, for example when running single file scripts, it will -# be trated as if there is one but its empty. - -# /mod.sloth -pub fn fib(n: i32) -> i32 { - match n { - 0 | 1 => n, - _ => fib(n - 1) + fib(n - 2), - } -} - -# /foo.sloth -use fib; # TODO: - -fib(5); # Works because everything inside of mod.sloth is fair game - -# This means if you want an extern library to be available in every module you just -# need to add a `pub(pkg) use extern "lib"` - -# In order to use modules or members of modules without quantifying the entire -# path you must include them using a `use` statement. -use foo::bar; - -# Sloth will use your root module (the one used as your entrypoint) for imports. -# In order to import from modules relative to your own you must prefix the use -# with a `::` -use ::from::relative; - -# If you would live to traverse up the module tree you can use the `super` -# psudo-module. -use - -# TODO: -# Sloth will automatically turn files relative to your own and directories -# relative to your own with a `mod.sloth` into modules. In order to traverse -# up the module tree you can use the `super` psudo-module. -use super::a; -use super::b; - -use std::rand::random; -use std::uuid; - -use spookylib::spook; -use http::{get, post}; -use web::Client as WebClient; - -# If you would like to export a module you can use the `pub` keyword, unlike -# other times when the pub keyword is used however sloth will by default only -# publish it to `pkg` -pub use parse; -pub use blog; diff --git a/tour/tooling.sloth b/tour/tooling.sloth deleted file mode 100644 index 74a74fe..0000000 --- a/tour/tooling.sloth +++ /dev/null @@ -1,88 +0,0 @@ -#!/usr/bin/env sloth - -## Making sure all your imports are correct and lint rules are being followed is -## important. You can do this in sloth using the `--check` flag. -## -## Examples: -## sloth --check file.sloth - -## Testing is important when trying to write resiliant, bug free software. Sloth -## comes with a full featured testing framework built in. In order to test your -## projects you can use the `--test` flag. -## -## Examples: -## sloth --test file.sloth - -## Benchmarking is important to make sure our software is fast. Sloth comes with -## a full featured micro-benchmarking framework built in. In order to benchmark -## your project you can use the `--bench` flag. -## -## With our benchmarking framework you will get 3 responses: -## - cold :: execution time before any code was JIT compiled -## - warm :: execution time after some code was JIT compiled -## - hot :: execution time after all code that can be JIT compiled is JIT -## compiled -## -## Examples: -## sloth --bench file.sloth - -## Maintaining the same code style accross an entire project is important while -## collaborating with others. In order to help with maintining these code styles -## sloth has a built in formatter that can be ran with the `--format` flag. -## -## In addition you can use `--format-mode check` in order to only check if the -## styles are valid, this is useful for CI pipelines. -## -## Examples: -## slock --format file.sloth -## slock --format --format-mode check file.sloth - -## Dealing with dependencies can be a bit of a pain, in order to make it a bit -## easier you can automatically update all dependencies in a project using the -## `--update` flag. This will scan through your project looking for looking for -## any `use extern` statements with an outdated version specified and update them. -## -## Examples: -## slock --update file.sloth - -## In order to push to canopy (the package repository) your dependencies must -## be locked to a specific version. In order to do this easily you can use the -## `--lock` flag. This will scan through your project looking for any `use extern` -## statements without a version specified and automatically specify the latest -## version. -## -## Examples: -## sloth --lock file.sloth - -## Publishing sloth packages to canopy can be done in 3 days, from the site by -## uploading a zip, from the site from a git repo or using the CLI. It can be -## done through the CLI using the `--publish` flag. -## -## Examples: -## sloth --publish file.sloth - -## If you wish to ahead of time compile your sloth code you can do so with the -## `--aot` flag. By default this will ahead of time compile to your platform -## however you can optionally specify one using the `--aot-target` flag. -## -## Limitations: -## - AOT compilation requires strict mode -## -## Examples: -## sloth --aot file.sloth -## sloth --aot --aot-target wasm file.sloth - -# Easily write tests with the test and assert keywords -test "add function" { - assert add(5, 5) == 10; - assert add(10, 5) == 15; - assert add(10, 5) != 10; -} - -# Easily write benchmarks with the bench & prepare keyword -bench "add function" { - # Use the `prepare` keyword to exclude code from the benchmark - prepare client = WebClient::new(); - - client.get("https://example.com"); -} diff --git a/tour/traits.sloth b/tour/traits.sloth deleted file mode 100644 index 80319de..0000000 --- a/tour/traits.sloth +++ /dev/null @@ -1,34 +0,0 @@ -# Much like Rust's traits or Haskell's type classes sloth uses a trait system for -# polymorphism. -trait BasicTrait { - fn add() -> i32; -} - -trait AddAssign: Add { - fn add_assign(value: i32, rhs: i32) -> i32; -} - -trait Add { - fn add(lhs: i32, rhs: i32) -> i32; - - default impl AddAssign { - fn add_assign(value: i32, rhs: i32) -> i32 { - return add(value, rhs); - } - } -} - -# In order to make implementing traits easier you can automatically derive traits. -# Types will implicitly derive from Debug, Copy, Eq and Ord if possible. -type Person = { - name: String, - age: i32, - hobbies: Set, -}; - -# You can easily derive from more traits using the `derive` keyword. -type Person derives Serialize, Deserialize = { - name: String, - age: i32, - hobbies: Set, -}; diff --git a/tour/types.sloth b/tour/types.sloth deleted file mode 100644 index 8af0856..0000000 --- a/tour/types.sloth +++ /dev/null @@ -1,91 +0,0 @@ -# Structure Type -type Person = { - name: String, - age: i32, - hobbies: Set, - grades: Map, -}; - -val cody = Person( - name: "Cody Q", - age: 17, - hobbies: { - "Computer Science", - "Cybersecurity", - }, - grades: { - "Computer Science": 100, - "Mathmatics": 96, - "Physics": 93, - "English": 78, - }, -); - -# Tuple Type -type Position = (i32, i32); - -# Tagged Union Type -type Option = - | None - | Some = T; - -type Class = Archer | Mage | Tank; - -type Operation = - | Add = (Operation, Operation) - | Lit = i32; - -# Untagged Union Type -# -# Unlike tagged unions if all variants of a untagged union implement a specific -# trait you will be able to call those trait methods without getting the variant -# first. -type Untagged = i32 + String; - -# Type Alias -type OptionPos = Option; - -# You can define untagged union types and tuple types inline without a name, this -# may be useful for one-off types only used by a single function. -val example: String + i32 = 52; -val example: (i32, i32) = (5, 5); - -# Functions can be associated with types using 'impl' blocks. -type Color = (f64, f64, f64); - -impl Color { - pub const BLACK = Color(0.0, 0.0, 0.0); - pub const WHITE = Color(1.0, 1.0, 1.0); - pub const RED = Color(1.0, 0.0, 0.0); - pub const GREEN = Color(0.0, 1.0, 0.0); - pub const BLUE = Color(0.0, 0.0, 1.0); - - ## Get a color from red green and blue - pub fn rgb(red: u8, green: u8, blue: u8) -> Color { - Color(red / 255.0, green / 255.0, blue / 255.0) - } - - ## Get a color from a hue, saturation and value - pub fn hsv(hue: f64, saturation: f64, value: f64) -> Color { - fn c(value: f64) -> u8 { - (value * 255) as u8 - } - - val h = (hue * 6).floor() as i32; - - val f = hue * 6 - h; - val p = value * (1 - saturation); - val q = value * (1 - f * saturation); - val t = value * (1 - (1 - f) * saturation); - - return match h { - 0 => Color(c(value), c(t), c(p)), - 1 => Color(c(q), c(value), c(p)), - 2 => Color(c(p), c(value), c(t)), - 3 => Color(c(p), c(q), c(value)), - 4 => Color(c(t), c(p), c(value)), - 5 => Color(c(value), c(p), c(q)), - _ => Color::BLACK, - } - } -} diff --git a/tour/variables.sloth b/tour/variables.sloth deleted file mode 100644 index c3a9137..0000000 --- a/tour/variables.sloth +++ /dev/null @@ -1,16 +0,0 @@ -# Variables can be declared using the `var` keyword, however they will be mutable. -# If you would like to make the variable immutable you can use `val` -# -# Variables can not be exported and can not be referrenced accross modules. -var x = 0; -val y = 0; - -x = 5; # Valid -y = 5; # Invalid - -# Constants can be declared using the `const` keyword, unlike variables they can -# be exported and accessed across modules. -const FPS = 60; - -pub const WIDTH = 5; -pub const HEIGHT = 17; -- cgit v1.2.3