Compare commits
2 Commits
e272737ea2
...
0.4.7
| Author | SHA1 | Date | |
|---|---|---|---|
| 6ca53e8959 | |||
|
8dfdad3f34
|
@@ -1,5 +1,9 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
[0.4.7]
|
||||||
|
|
||||||
|
- Added support for Windows CRLF endings
|
||||||
|
|
||||||
[0.4.6]
|
[0.4.6]
|
||||||
|
|
||||||
- Fixed bug in compiler where you were unable to assign a `const` value to
|
- Fixed bug in compiler where you were unable to assign a `const` value to
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
<ModMetadata xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
<ModMetadata xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||||
<Name>Slang</Name>
|
<Name>Slang</Name>
|
||||||
<Author>JoeDiertay</Author>
|
<Author>JoeDiertay</Author>
|
||||||
<Version>0.4.6</Version>
|
<Version>0.4.7</Version>
|
||||||
<Description>
|
<Description>
|
||||||
[h1]Slang: High-Level Programming for Stationeers[/h1]
|
[h1]Slang: High-Level Programming for Stationeers[/h1]
|
||||||
|
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ namespace Slang
|
|||||||
{
|
{
|
||||||
public const string PluginGuid = "com.biddydev.slang";
|
public const string PluginGuid = "com.biddydev.slang";
|
||||||
public const string PluginName = "Slang";
|
public const string PluginName = "Slang";
|
||||||
public const string PluginVersion = "0.4.6";
|
public const string PluginVersion = "0.4.7";
|
||||||
|
|
||||||
private static Harmony? _harmony;
|
private static Harmony? _harmony;
|
||||||
|
|
||||||
|
|||||||
2
rust_compiler/Cargo.lock
generated
2
rust_compiler/Cargo.lock
generated
@@ -930,7 +930,7 @@ checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "slang"
|
name = "slang"
|
||||||
version = "0.4.6"
|
version = "0.4.7"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"anyhow",
|
"anyhow",
|
||||||
"clap",
|
"clap",
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "slang"
|
name = "slang"
|
||||||
version = "0.4.6"
|
version = "0.4.7"
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
|
|
||||||
[workspace]
|
[workspace]
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ macro_rules! keyword {
|
|||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Debug, PartialEq, Hash, Eq, Clone, Logos)]
|
#[derive(Debug, PartialEq, Hash, Eq, Clone, Logos)]
|
||||||
#[logos(skip r"[ \t\f]+")]
|
#[logos(skip r"[ \r\t\f]+")]
|
||||||
#[logos(extras = Extras)]
|
#[logos(extras = Extras)]
|
||||||
#[logos(error(LexError, LexError::from_lexer))]
|
#[logos(error(LexError, LexError::from_lexer))]
|
||||||
pub enum TokenType<'a> {
|
pub enum TokenType<'a> {
|
||||||
@@ -843,3 +843,20 @@ documented! {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[cfg(test)]
|
||||||
|
mod tests {
|
||||||
|
use super::TokenType;
|
||||||
|
use logos::Logos;
|
||||||
|
|
||||||
|
#[test]
|
||||||
|
fn test_windows_crlf_endings() -> anyhow::Result<()> {
|
||||||
|
let src = "let i = 0;\r\n";
|
||||||
|
|
||||||
|
let lexer = TokenType::lexer(src);
|
||||||
|
|
||||||
|
let tokens = lexer.collect::<Vec<_>>();
|
||||||
|
|
||||||
|
assert!(!tokens.iter().any(|res| res.is_err()));
|
||||||
|
Ok(())
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user