Call this v0.5.3

master
Pentium44 2021-04-12 03:51:48 -07:00
parent bc74e93305
commit e5c7f525f8
5 changed files with 45 additions and 2 deletions

View File

@ -2,7 +2,7 @@
# (C) Copyright 2014-2021 Chris Dorman, some rights reserved (GPLv2)
# Some changes and tweaks from Menchers
VERSION = \"0.5.2\"
VERSION = \"0.5.3\"
VERSION_EXTRA = \"$(EXTRA)\"
PREFIX ?= /usr

View File

@ -2,7 +2,7 @@
# (C) Copyright 2014-2021 Chris Dorman, some rights reserved (GPLv2)
# Some changes and tweaks from Menchers
VERSION = \"0.5.2\"
VERSION = \"0.5.3\"
VERSION_EXTRA = \"$(EXTRA)\"
PREFIX ?= /usr

View File

@ -134,6 +134,7 @@ Done
List of finished features, in a rough summary.
* Added help, and version functions
* Simple syntax checking and error reporting, its a lazy language, syntax can sway.
* Most syntax errors will produce warnings instead of terminating process
* Up to 32 layer function piping
@ -151,6 +152,8 @@ Changelog
Changes between version bumps in SlideScript. Hoping to have a lightweight top-down scripting language
by V1.0.0 release! From there it will be molding and preserving the art.
* V0.5.3
* Added version, and help command
* V0.5.2
* Bugfixes and tweaks

View File

@ -77,3 +77,35 @@
#define ENCOFFSET 3
#define ENCSTEPODD 2
#define ENCSTEPEVEN 2
// HELP PRINTOUT
#define FUNCTION_HELP "-[Main Functions]-\nlist:\n" \
" print \"<string>\" |" \
" sleep <integer> |" \
" encode \"<string>\"\n" \
" decode \"<string>\" |" \
" compress \"<archive name>\" \"<file/list>\"\n" \
" decompress \"<archive name>\" |" \
" calc \"<int> <+/-*> <int>\"\n" \
" move \"<orig>\" \"<new>\" |" \
" chdir \"<path>\" |" \
" showdir |" \
" showpath\n" \
" isdir \"<dirname>\" |" \
" isfile \"<filename>\" |" \
" delete \"<filename>\"\n" \
" nethttp \"<port>\" \"<forkval>\" (1 forks, 0 nofork)\n" \
" read \"<filename>\" |" \
" write \"<filename>\" \"<string>\"\n" \
" cat \"<filename>\" \"<string>\" |" \
" exec \"<cmd>\"\n" \
"\n-[Variables, Pipes, and Backquoting]-\nExample:\n" \
" FORK=`isfile \"index.html\"` -> returns 1 on find\n" \
" write \"port.txt\" \"8888\" -> writes '8888' to port.txt\n" \
" read \"port.txt\" | nethttp \"%PIPE%\" \"%FORK%\"\n\n" \
"This an example of how piping works, along with variables and \n" \
"backquote function execution. Return values are saved as variables.\n" \
"\n-[Specials]-\nExample:\n" \
"comp: \"<int1/str1>\" \"<int2/str2>\" -> returns (true|false)\n" \
"loop: <int>; <function> -> loops function for 'int' times\n"

View File

@ -52,9 +52,17 @@ char *process_line(char *line)
return NULL;
}
// Check for main calls from user in interactive
else if(strncmp("exit", tok_srch, 4) == 0)
syn_error("ss:exit called");
else if(strncmp("version", tok_srch, 7) == 0)
printf("ss:version: %s, type 'help' for function list\n", VERSION);
else if(strncmp("help", tok_srch, 4) == 0)
printf("ss:help:\n%s", FUNCTION_HELP);
// Lets add if and loop statements, make this
// Somewhat usable as a language in other instances