Releases: mwd1993/Vapor
Vapor Interpreter/Parser 0.0.3
Added a bunch of useful and new keywords. The voice input functionality is implemented in this release, but the SpeechRecognition executable required, hasn't been released yet (will be put on the Github under a directory, when released, along with other useful/required executables (VaporIDE)).
The things added to this version of the Vapor Parser are shown below:
added native for loop, inc and dec
my_string = 'apples'
inc i < len(my_string) {
log(my_string[i])
}
dec i=len(my_string) > 0 {
log(my_string[i])
}
added v-input for voice input
# requires SpeechRecognition.exe (not yet available)
# but this works and can be used to get user input via their
# microphone:
v-input myVoiceInputVarName
added cmp and !cmp var1 var2 syntax: cmp myvar myvar2 -> checks if they are the same value !cmp does the opposite
cmp var1 var2 comparedValueVariableBoolOut
!cmp var1 var2 comparedValueVariableBoolOut
# or
cmp var1 var2 {
'they are the same'
}
!cmp var1 var2 {
'they are not the same'
}
added list-gen varname sizeoflist & added dict-gen varname sizeofdict
list-gen outputvarname 10 # 10 is the size of the list
dict-gen outputvarname 10 # 10 is the size of the dict
added cmd-line syntax for quick cmd line access
cmd-line 'echo "hi"&pause'
cmd-line 'pip install somelibrary'
simple deep copy syntax: copy var2copy newvar
copy variable2copy newvar
added HotKeys standard library class
using Hotkeys.vap
# Syntax: tuple(VK keycode, secondary VK keycode : or None), methodToCall, Timeout
# 0x50 in this example, is the letter key P, with no secondary keystroke (None)
addHotKey((0x50, None), t,1000)
deployHotKeys()
can declare variables for more readability like so: v myvar = 1, but myvar = 1 is the same
myvar = 'hello world'
v myvar = 'hello world'
# both do the same thing, declaring a variable
Vapor Interpreter/Parser 0.0.2
Added keyword: assert-type
usage:
assert-type myVar type
Introduced a new way to return a value from a method.
Maintaining backwards compatibility, you can still use return something
With this version, you can now simply return using -> something
Vapor Interpreter/Parser 0.0.1
Initial Vapor Interpreter release, could be buggy.
You run command line, nav to the extraction directory
then run the command:
vapor_parsor.exe my_vapor_file.vap args1 arg2 etc
to run Vapor code ( .vap file )