From 132030516831948da56a298fe154837aa3a071c9 Mon Sep 17 00:00:00 2001 From: RobbyV2 Date: Mon, 9 Dec 2024 09:42:33 -0600 Subject: [PATCH] 0.9.515 - Fixes --- Cargo.lock | 2 +- Cargo.toml | 2 +- Pseudolang.md | 8 ++++++++ installer/pseudolang.nsi | 4 ++-- readme.md | 2 +- src/tests/mod.rs | 2 ++ wapm.toml | 2 +- 7 files changed, 16 insertions(+), 6 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index a21e498..ca0eba8 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -112,7 +112,7 @@ checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" [[package]] name = "fplc" -version = "0.9.513" +version = "0.9.515" dependencies = [ "chrono", "chrono-tz", diff --git a/Cargo.toml b/Cargo.toml index 7ce2266..f14c15c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ [package] name = "fplc" -version = "0.9.513" +version = "0.9.515" edition = "2021" description = "A pseudolang interpreter written in Rust" repository = "https://github.com/PseudoLang-Software-Foundation/Pseudolang" diff --git a/Pseudolang.md b/Pseudolang.md index dba8d21..201b0e7 100644 --- a/Pseudolang.md +++ b/Pseudolang.md @@ -435,6 +435,14 @@ TRY { The try-catch statement allows you to handle errors that might occur during program execution. Any statements inside the try block that cause an error will stop execution of that block and transfer control to the catch block. The error message is stored in the variable specified in parentheses after catch and can be used inside the catch block. +```psl +expression <- "x* (x+1)*(x+2)" +x <- 3 +DISPLAY(EVAL(expression)) +``` + +EVAL takes in a string expression, that will return the evaluated response as if it were executed in the program. + `EXIT()` Terminates program execution immediately. diff --git a/installer/pseudolang.nsi b/installer/pseudolang.nsi index 8799935..1235c0e 100644 --- a/installer/pseudolang.nsi +++ b/installer/pseudolang.nsi @@ -4,7 +4,7 @@ !define MUI_ICON "Pseudolang-Logo.ico" -Name "PseudoLang Installer v0.9.513" +Name "PseudoLang Installer v0.9.515" InstallDir "$PROGRAMFILES\PseudoLang\" OutFile "../release/installer/pseudolang-setup-x64.exe" BrandingText "(c) 2024 PseudoLang Software Foundation" @@ -33,7 +33,7 @@ Section "" WriteRegStr HKLM "SYSTEM\CurrentControlSet\Control\Session Manager\Environment" "Path" "$INSTDIR;$R0" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pseudolang" "DisplayName" "Pseudolang" - WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pseudolang" "DisplayVersion" "0.9.513" + WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pseudolang" "DisplayVersion" "0.9.515" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pseudolang" "Publisher" "Pseudolang Software Foundation" WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Uninstall\Pseudolang" "DisplayIcon" "$INSTDIR\Pseudolang-Logo.ico" diff --git a/readme.md b/readme.md index 44c4858..076a356 100644 --- a/readme.md +++ b/readme.md @@ -9,7 +9,7 @@

Build and Test Pseudolang - Version + Version Nightly Releases

diff --git a/src/tests/mod.rs b/src/tests/mod.rs index 7b6e521..77a725b 100644 --- a/src/tests/mod.rs +++ b/src/tests/mod.rs @@ -2469,6 +2469,8 @@ DISPLAY(arr)"#, "60", ); + assert_output(r#"DISPLAY(EVAL("POW(2, 3)"))"#, "8"); + assert_output( r#"x <- 4 DISPLAY(TOSTRING(EVAL("x=3")) + " " + TOSTRING(EVAL("x = 4")))"#, diff --git a/wapm.toml b/wapm.toml index a58acd1..93315ab 100644 --- a/wapm.toml +++ b/wapm.toml @@ -1,7 +1,7 @@ [package] name = "pseudolang/fplc" -version = "0.9.513" +version = "0.9.515" description = "A pseudolang interpreter written in Rust" license = "MIT" readme = "readme.md"