Showing off an example of the CeeV language
Very much in the beginning phase, and I haven't starting the parsing yet, but it is a start.master
parent
c5a1cda975
commit
9745e4d63a
|
@ -0,0 +1,4 @@
|
|||
name=examples
|
||||
version=0.0.1
|
||||
author=Ruben Dahl
|
||||
email=dahrub@nxi.no
|
|
@ -0,0 +1,19 @@
|
|||
// creating a character
|
||||
let mainCharacter = Character("Testy", "testy.png")
|
||||
|
||||
// creating a location
|
||||
let mainLoc = Location("location.png")
|
||||
|
||||
// entering a location
|
||||
show mainLoc
|
||||
enter mainCharacter center
|
||||
|
||||
mainCharacter "Hello World"
|
||||
|
||||
// exiting a location
|
||||
exit mainCharacter
|
||||
hide mainLoc
|
||||
|
||||
// cleanup
|
||||
unlet mainCharacter
|
||||
unlet mainLoc
|
|
@ -1,4 +0,0 @@
|
|||
let test = Character("Test")
|
||||
test "Hello World"
|
||||
|
||||
unlet test
|
|
@ -1,16 +1,14 @@
|
|||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
if exists("b:current_syntax") | finish | endif
|
||||
|
||||
set iskeyword=a-z,A-Z,-,*,_,!,@
|
||||
|
||||
" Language keywords
|
||||
syntax keyword ceevKeywords let unlet
|
||||
|
||||
syntax keyword ceevConstant Character
|
||||
syntax keyword ceevKeywords let unlet enter exit show hide
|
||||
syntax keyword ceevTodos TODO
|
||||
syntax keyword ceevConstant Character Location Image
|
||||
|
||||
" Comments
|
||||
syntax region ceevCommentLine start="//" end="$" contains=ceevTodos
|
||||
syntax region ceevCommentLine start="//" end="$" contains=ceevTodos
|
||||
|
||||
" String literals
|
||||
syntax region ceevString start=/\v"/ skip=/\v\\./ end=/\v"/ contains=ceevEscapes
|
||||
|
@ -24,6 +22,7 @@ syntax match ceevEscapes display contained "\\[nr\"']"
|
|||
" Number literals
|
||||
syntax region ceevNumber start=/\s\d/ skip=/\d/ end=/\s/
|
||||
|
||||
|
||||
" Set highlights
|
||||
highlight default link ceevTodos Todo
|
||||
highlight default link ceevKeywords Keyword
|
||||
|
|
Loading…
Reference in New Issue