Skip to content
This repository has been archived by the owner on Dec 11, 2023. It is now read-only.

Commit

Permalink
Closes #49: Double semicolon as assertion line delimiter.
Browse files Browse the repository at this point in the history
  • Loading branch information
p4t5h3 committed Jan 27, 2022
1 parent 185bd56 commit 9d5e244
Show file tree
Hide file tree
Showing 38 changed files with 888 additions and 889 deletions.
70 changes: 35 additions & 35 deletions Tests/syntax_test_break_continue.pb
Original file line number Diff line number Diff line change
@@ -1,53 +1,53 @@
; SYNTAX TEST "Packages/PureBasic/PureBasic.sublime-syntax"
;; SYNTAX TEST "Packages/PureBasic/PureBasic.sublime-syntax"

EnableExplicit

Define k.i

For k = 0 To 10
; <- keyword.control.purebasic
;^^ keyword.control.purebasic
; ^ variable.other.purebasic
; ^ keyword.operator.assignment.purebasic
; ^ constant.numeric.purebasic
; ^^ keyword.control.purebasic
; ^^ constant.numeric.purebasic
;; <- keyword.control.purebasic
;;^ keyword.control.purebasic
;; ^ variable.other.purebasic
;; ^ keyword.operator.assignment.purebasic
;; ^ constant.numeric.purebasic
;; ^^ keyword.control.purebasic
;; ^^ constant.numeric.purebasic
If k = 5
; ^^ keyword.control.purebasic
; ^ variable.other.purebasic
; ^ keyword.operator.assignment.purebasic
; ^ constant.numeric.purebasic
;; ^^ keyword.control.purebasic
;; ^ variable.other.purebasic
;; ^ keyword.operator.assignment.purebasic
;; ^ constant.numeric.purebasic
Break
; ^^^^^ keyword.control.purebasic
;; ^^^^^ keyword.control.purebasic
EndIf
; ^^^^^ keyword.control.purebasic
;; ^^^^^ keyword.control.purebasic
Debug k
; ^^^^^ keyword.other.purebasic
; ^ variable.other.purebasic
;; ^^^^^ keyword.other.purebasic
;; ^ variable.other.purebasic
Next
; <- keyword.control.purebasic
;^^^ keyword.control.purebasic
;; <- keyword.control.purebasic
;;^^ keyword.control.purebasic

For k = 0 To 10
; <- keyword.control.purebasic
;^^ keyword.control.purebasic
; ^ variable.other.purebasic
; ^ keyword.operator.assignment.purebasic
; ^ constant.numeric.purebasic
; ^^ keyword.control.purebasic
; ^^ constant.numeric.purebasic
;; <- keyword.control.purebasic
;;^ keyword.control.purebasic
;; ^ variable.other.purebasic
;; ^ keyword.operator.assignment.purebasic
;; ^ constant.numeric.purebasic
;; ^^ keyword.control.purebasic
;; ^^ constant.numeric.purebasic
If k = 5
; ^^ keyword.control.purebasic
; ^ variable.other.purebasic
; ^ keyword.operator.assignment.purebasic
; ^ constant.numeric.purebasic
;; ^^ keyword.control.purebasic
;; ^ variable.other.purebasic
;; ^ keyword.operator.assignment.purebasic
;; ^ constant.numeric.purebasic
Continue
; ^^^^^^^^ keyword.control.purebasic
;; ^^^^^^^^ keyword.control.purebasic
EndIf
; ^^^^^ keyword.control.purebasic
;; ^^^^^ keyword.control.purebasic
Debug k
; ^^^^^ keyword.other.purebasic
; ^ variable.other.purebasic
;; ^^^^^ keyword.other.purebasic
;; ^ variable.other.purebasic
Next
; <- keyword.control.purebasic
;^^^ keyword.control.purebasic
;; <- keyword.control.purebasic
;;^^ keyword.control.purebasic
104 changes: 52 additions & 52 deletions Tests/syntax_test_compiler_directives.pb
Original file line number Diff line number Diff line change
@@ -1,76 +1,76 @@
; SYNTAX TEST "Packages/PureBasic/PureBasic.sublime-syntax"
;; SYNTAX TEST "Packages/PureBasic/PureBasic.sublime-syntax"

EnableExplicit
; <- keyword.other.purebasic
;^^^^^^^^^^^^^ keyword.other.purebasic
;; <- keyword.other.purebasic
;;^^^^^^^^^^^^ keyword.other.purebasic

CompilerIf #PB_Compiler_OS = #PB_OS_Linux
; <- keyword.control.purebasic
;^^^^^^^^^ keyword.control.purebasic
; ^ punctuation.definition.variable.purebasic
; ^^^^^^^^^^^^^^^ variable.other.constant.purebasic
; ^ keyword.operator.assignment.purebasic
; ^ punctuation.definition.variable.purebasic
; ^^^^^^^^^^^^ variable.other.constant.purebasic
;; <- keyword.control.purebasic
;;^^^^^^^^ keyword.control.purebasic
;; ^ punctuation.definition.variable.purebasic
;; ^^^^^^^^^^^^^^^ variable.other.constant.purebasic
;; ^ keyword.operator.assignment.purebasic
;; ^ punctuation.definition.variable.purebasic
;; ^^^^^^^^^^^^ variable.other.constant.purebasic
CompilerWarning "Linux isn't supported, sorry."
; ^^^^^^^^^^^^^^^ keyword.other.purebasic
; ^ punctuation.definition.string.begin
; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ string.quoted.double
; ^ punctuation.definition.string.end
;; ^^^^^^^^^^^^^^^ keyword.other.purebasic
;; ^ punctuation.definition.string.begin
;; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ string.quoted.double
;; ^ punctuation.definition.string.end
CompilerElseIf #PB_Compiler_OS = #PB_OS_MacOS
; <- keyword.control.purebasic
;^^^^^^^^^^^^^ keyword.control.purebasic
; ^ punctuation.definition.variable.purebasic
; ^^^^^^^^^^^^^^^ variable.other.constant.purebasic
; ^ keyword.operator.assignment.purebasic
; ^ punctuation.definition.variable.purebasic
; ^^^^^^^^^^^^ variable.other.constant.purebasic
;; <- keyword.control.purebasic
;;^^^^^^^^^^^^ keyword.control.purebasic
;; ^ punctuation.definition.variable.purebasic
;; ^^^^^^^^^^^^^^^ variable.other.constant.purebasic
;; ^ keyword.operator.assignment.purebasic
;; ^ punctuation.definition.variable.purebasic
;; ^^^^^^^^^^^^ variable.other.constant.purebasic
Debug "This is macOS."
; ^^^^^ keyword.other.purebasic
; ^ punctuation.definition.string.begin
; ^^^^^^^^^^^^^^^^ string.quoted.double
; ^ punctuation.definition.string.end
;; ^^^^^ keyword.other.purebasic
;; ^ punctuation.definition.string.begin
;; ^^^^^^^^^^^^^^^^ string.quoted.double
;; ^ punctuation.definition.string.end
CompilerElse
; <- keyword.control.purebasic
;^^^^^^^^^^^ keyword.control.purebasic
;; <- keyword.control.purebasic
;;^^^^^^^^^^ keyword.control.purebasic
CompilerError "OS supported, you can now comment me."
; ^^^^^^^^^^^^^ keyword.other.purebasic
; ^ punctuation.definition.string.begin
; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ string.quoted.double
; ^ punctuation.definition.string.end
;; ^^^^^^^^^^^^^ keyword.other.purebasic
;; ^ punctuation.definition.string.begin
;; ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ string.quoted.double
;; ^ punctuation.definition.string.end
CompilerEndIf
; <- keyword.control.purebasic
;^^^^^^^^^^^^ keyword.control.purebasic
;; <- keyword.control.purebasic
;;^^^^^^^^^^^ keyword.control.purebasic

CompilerSelect #PB_Compiler_OS
; <- keyword.control.purebasic
;^^^^^^^^^^^^^ keyword.control.purebasic
; ^ punctuation.definition.variable.purebasic
; ^^^^^^^^^^^^^^^ variable.other.constant.purebasic
;; <- keyword.control.purebasic
;;^^^^^^^^^^^^ keyword.control.purebasic
;; ^ punctuation.definition.variable.purebasic
;; ^^^^^^^^^^^^^^^ variable.other.constant.purebasic
CompilerCase #PB_OS_MacOS
; ^^^^^^^^^^^^ keyword.control.purebasic
; ^ punctuation.definition.variable.purebasic
; ^^^^^^^^^^^^ variable.other.constant.purebasic
;; ^^^^^^^^^^^^ keyword.control.purebasic
;; ^ punctuation.definition.variable.purebasic
;; ^^^^^^^^^^^^ variable.other.constant.purebasic
CompilerCase #PB_OS_Linux
; ^^^^^^^^^^^^ keyword.control.purebasic
; ^ punctuation.definition.variable.purebasic
; ^^^^^^^^^^^^ variable.other.constant.purebasic
;; ^^^^^^^^^^^^ keyword.control.purebasic
;; ^ punctuation.definition.variable.purebasic
;; ^^^^^^^^^^^^ variable.other.constant.purebasic
CompilerDefault
; ^^^^^^^^^^^^^^^ keyword.control.purebasic
;; ^^^^^^^^^^^^^^^ keyword.control.purebasic
CompilerEndSelect
; <- keyword.control.purebasic
;^^^^^^^^^^^^^^^^ keyword.control.purebasic
;; <- keyword.control.purebasic
;;^^^^^^^^^^^^^^^ keyword.control.purebasic

Define Test = 10

EnableASM
; <- keyword.other.purebasic
;^^^^^^^^ keyword.other.purebasic
;; <- keyword.other.purebasic
;;^^^^^^^ keyword.other.purebasic
MOV dword [v_Test],20
DisableASM
; <- keyword.other.purebasic
;^^^^^^^^^ keyword.other.purebasic
;; <- keyword.other.purebasic
;;^^^^^^^^ keyword.other.purebasic

DisableExplicit
; <- keyword.other.purebasic
;^^^^^^^^^^^^^^ keyword.other.purebasic
;; <- keyword.other.purebasic
;;^^^^^^^^^^^^^ keyword.other.purebasic
8 changes: 4 additions & 4 deletions Tests/syntax_test_constants.pb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
; SYNTAX TEST "Packages/PureBasic/PureBasic.sublime-syntax"
;; SYNTAX TEST "Packages/PureBasic/PureBasic.sublime-syntax"

EnableExplicit

#CustomConstant = 123
; <- variable.other.constant.purebasic punctuation.definition.variable.purebasic
; <- variable.other.constant.purebasic
;^^^^^^^^^^^^^^ variable.other.constant.purebasic
;; <- variable.other.constant.purebasic punctuation.definition.variable.purebasic
;; <- variable.other.constant.purebasic
;;^^^^^^^^^^^^^ variable.other.constant.purebasic
Loading

0 comments on commit 9d5e244

Please sign in to comment.