Skip to content

Vapor Interpreter/Parser 0.0.3

Latest
Compare
Choose a tag to compare
@mwd1993 mwd1993 released this 09 May 12:44
· 2 commits to main since this release
1cee7aa

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