06.09.2013, 10:33
Sehr schön. Die Liste aller Include Funktionen dumpe ich dir noch raus.
Allerdings ist das nicht so wichtig, da du alles vor einem "{" als Funktion highlighten kannst, es sei denn es fängt mit einem "!" an, dann ist es ein Macro.
Wenn du das Highlightning perfekt machen willst, dann schau mal das in AIDE als Referenz an:
[ab3]; comment:
; this is a highlightning test of the AIDE editor
; tokens
optimize 7
Syntax 2
NPrint "string"
If (a.w) Then Print "a is not zero"
result.l = DrawImage_ (*image.Image,*rp.RastPort,100,200)
Poke.s address,0 ; the token is "Poke", followed by the type
Poke$ address,0
a$ = Right$("hallo",0) ; the $ is part of the tokenname
End
; constant:
#CONSTANT = 12345
; numbers:
x.l = 1234
x.l = $DEADBEEF
x.l = $deadbeef
x.l = %101010101110101
x.l = @"XZY_"
x.l = Peek.l(&x)
f.f = 2.13
; label:
label:
.label2
'locallabel
x.l = Peek.l(?label)
Goto label
; line concatenation
x.l = @@
1
; Token with type
Poke.l &x,1234
; String Escape sequences
a$ = "\\r10\\__THIS_FUNCTION: \\__DATE_GER__,\\__VER_MAJOR\\n\\0A\\0asomething\\bc\\BC\\11\\22"
a$ = "this is a string"
a$ = "this is a non terminated string!
a$ = "this contains an invalid escape sequence: \\__DATA_GER__"
; Types
NEWTYPE.testType
x.l
y.l
*rp.RastPort
End NEWTYPE
DEFTYPE.testType test
test.testType\x = 0
; assembler
MOVE.l (a0),D0
MOVE.l #12,D0
MOVE.l #$abba,D7
MOVE.l #"x",D0
; function
Function.l testFunc{x.l,@optional.l}
Function Return x+1
End Function
Statement testStat{a$}
End Statement
x = testFunc{2}
testStat{"Hallo Welt"}
; Macro
Macro testMacro
x.l = `1
End Macro
!testMacro{2}[/ab3]
Allerdings ist das nicht so wichtig, da du alles vor einem "{" als Funktion highlighten kannst, es sei denn es fängt mit einem "!" an, dann ist es ein Macro.
Wenn du das Highlightning perfekt machen willst, dann schau mal das in AIDE als Referenz an:
[ab3]; comment:
; this is a highlightning test of the AIDE editor
; tokens
optimize 7
Syntax 2
NPrint "string"
If (a.w) Then Print "a is not zero"
result.l = DrawImage_ (*image.Image,*rp.RastPort,100,200)
Poke.s address,0 ; the token is "Poke", followed by the type
Poke$ address,0
a$ = Right$("hallo",0) ; the $ is part of the tokenname
End
; constant:
#CONSTANT = 12345
; numbers:
x.l = 1234
x.l = $DEADBEEF
x.l = $deadbeef
x.l = %101010101110101
x.l = @"XZY_"
x.l = Peek.l(&x)
f.f = 2.13
; label:
label:
.label2
'locallabel
x.l = Peek.l(?label)
Goto label
; line concatenation
x.l = @@
1
; Token with type
Poke.l &x,1234
; String Escape sequences
a$ = "\\r10\\__THIS_FUNCTION: \\__DATE_GER__,\\__VER_MAJOR\\n\\0A\\0asomething\\bc\\BC\\11\\22"
a$ = "this is a string"
a$ = "this is a non terminated string!
a$ = "this contains an invalid escape sequence: \\__DATA_GER__"
; Types
NEWTYPE.testType
x.l
y.l
*rp.RastPort
End NEWTYPE
DEFTYPE.testType test
test.testType\x = 0
; assembler
MOVE.l (a0),D0
MOVE.l #12,D0
MOVE.l #$abba,D7
MOVE.l #"x",D0
; function
Function.l testFunc{x.l,@optional.l}
Function Return x+1
End Function
Statement testStat{a$}
End Statement
x = testFunc{2}
testStat{"Hallo Welt"}
; Macro
Macro testMacro
x.l = `1
End Macro
!testMacro{2}[/ab3]