Skip to content

Commit

Permalink
Implement new style format & numerous changes to make this possible
Browse files Browse the repository at this point in the history
  • Loading branch information
fincs committed Mar 2, 2014
1 parent 7d4bcee commit c5c326e
Show file tree
Hide file tree
Showing 9 changed files with 248 additions and 265 deletions.
18 changes: 18 additions & 0 deletions source/ahk.properties
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,24 @@ ahk.debugger.capture.streams=1
ahk.debugger.max.obj.children=100
ahk.debugger.max.data=131072

# Old style format compatibility defines
s4ahk.style.default=$(style.ahk1.0)
s4ahk.style.comment.line=$(style.ahk1.1)
s4ahk.style.comment.block=$(style.ahk1.2)
s4ahk.style.escape=$(style.ahk1.3)
s4ahk.style.operator=$(style.ahk1.5)
s4ahk.style.string=$(style.ahk1.6)
s4ahk.style.number=$(style.ahk1.7)
s4ahk.style.wordop=$(style.ahk1.17)
s4ahk.style.var=$(style.ahk1.8)
s4ahk.style.func=$(style.ahk1.13)
s4ahk.style.directive=$(style.ahk1.14)
s4ahk.style.label=$(style.ahk1.10)
s4ahk.style.flow=$(style.ahk1.11)
s4ahk.style.biv=$(style.ahk1.16)
s4ahk.style.bif=$(style.ahk1.12)
s4ahk.style.error=$(style.ahk1.20)

# Keywords
import ahk.keywords

Expand Down
18 changes: 9 additions & 9 deletions source/lua.properties
Original file line number Diff line number Diff line change
Expand Up @@ -72,27 +72,27 @@ comment.block.at.line.start.lua=1
# White space: Visible only in View Whitespace mode (or if it has a back colour)
style.lua.0=
# Block comment (Lua 5.0)
style.lua.1=$(style.ahk1.2)
style.lua.1=$(s4ahk.style.comment.block)
# Line comment
style.lua.2=$(style.ahk1.1)
style.lua.2=$(s4ahk.style.comment.line)
# Doc comment -- Not used in Lua (yet?)
style.lua.3=
# Number
style.lua.4=$(style.ahk1.7)
style.lua.4=$(s4ahk.style.number)
# Keyword
style.lua.5=$(style.ahk1.17)
style.lua.5=$(s4ahk.style.wordop)
# (Double quoted) String
style.lua.6=$(style.ahk1.6)
style.lua.6=$(s4ahk.style.string)
# Character (Single quoted string)
style.lua.7=$(style.ahk1.6)
style.lua.7=$(s4ahk.style.string)
# Literal string
style.lua.8=$(style.ahk1.6),back:#E0FFFF,bold
style.lua.8=$(s4ahk.style.string),back:#E0FFFF,bold
# Preprocessor (obsolete in Lua 4.0 and up)
style.lua.9=fore:#F04020,bold,italics
# Operators
style.lua.10=$(style.ahk1.5)
style.lua.10=$(s4ahk.style.operator)
# Identifier (everything else...)
style.lua.11=
style.lua.11=$(s4ahk.style.var)
# End of line where string is not closed
style.lua.12=$(style.ahk1.20)
# Other keywords (bozo test colors, but toned down ;)
Expand Down
97 changes: 37 additions & 60 deletions source/newuser/Styles/Blank.style.properties
Original file line number Diff line number Diff line change
@@ -1,72 +1,49 @@
# AutoHotkey syntax highlighting style for SciTE
# Blank style
#
# June 5, 2010 - fincs
#

# Base (background, base font)
style.ahk1.32=
# New SciTE4AutoHotkey style format
s4ahk.style=1

# Default (everything not below: spaces, untyped parameters)
style.ahk1.0=
# Default text font
default.text.font=Courier New

# Line comment (; syntax)
style.ahk1.1=
# Base (background, base font)
style.*.32=font:$(default.text.font),back:#FFFFFFF,fore:#000000,size:10

# Default style
s4ahk.style.default=
# Line comment (; syntax)
s4ahk.style.comment.line=
# Block comment (/*...*/ syntax)
style.ahk1.2=

s4ahk.style.comment.block=
# Escaped characters (`x)
style.ahk1.3=

s4ahk.style.escape=
# Operator
style.ahk1.4=

# Expression assignement operator
style.ahk1.5=

s4ahk.style.operator=
# String
style.ahk1.6=

s4ahk.style.string=
# Number
style.ahk1.7=

# Identifier (variable & function call)
# Not used by the lexer but by the style below and by hotkeys
style.ahk1.8=

# Variable dereferencing %varName%
style.ahk1.9=

# Label & Hotstrings (& Function definition?). Also defines a bit of style for hotkeys.
style.ahk1.10=

# Keyword - Flow of control
style.ahk1.11=

# Keyword - Commands
style.ahk1.12=

# Keyword - Functions
style.ahk1.13=

# Keyword - Directives
style.ahk1.14=

# Keyword - Keys & buttons
style.ahk1.15=

# Keyword - Built-in Variables
style.ahk1.16=

# Keyword - special parameters ("Keywords")
style.ahk1.17=

# Keyword - User defined
style.ahk1.18=

# Variable keyword (built-in) dereferencing %A_xxx%
style.ahk1.19=

# Error (unclosed string, unknown operator, invalid dereferencing, etc.)
style.ahk1.20=
s4ahk.style.number=
# Word operator/Reserved keyword
s4ahk.style.wordop=
# Variable/Identifier
s4ahk.style.var=
# (v2) Function / (v1.x) Built-in function
s4ahk.style.func=
# Directive
s4ahk.style.directive=
# Label/Hotkey
s4ahk.style.label=
# Flow of control
s4ahk.style.flow=
# Built-in variable
s4ahk.style.biv=
# (v2) Built-in function / (v1.x) Command
s4ahk.style.bif=
# Syntax error
s4ahk.style.error=

# Old styles for AutoHotkey v1.x code
s4ahk.style.old.key=fore:#000000
s4ahk.style.old.user=fore:#800020,bold
99 changes: 38 additions & 61 deletions source/newuser/Styles/Classic.style.properties
Original file line number Diff line number Diff line change
@@ -1,72 +1,49 @@
# AutoHotkey syntax highlighting style for SciTE
# Default style
#
# May 29, 2010 - fincs
# Classic style
#

# Base (background, base font)
#style.ahk1.32=back:#FCFFFCC,font:Courier New
# New SciTE4AutoHotkey style format
s4ahk.style=1

# Default (everything not below: spaces, untyped parameters)
style.ahk1.0=fore:#707070,bold
# Default text font
default.text.font=Courier New

# Line comment (; syntax)
style.ahk1.1=fore:#008000,italics
# Base (background, base font)
style.*.32=font:$(default.text.font),back:#FFFFFFF,fore:#000000,size:10

# Default style
s4ahk.style.default=fore:#707070,bold
# Line comment (; syntax)
s4ahk.style.comment.line=fore:#008000,italics
# Block comment (/*...*/ syntax)
style.ahk1.2=fore:#406040,italics

s4ahk.style.comment.block=fore:#406040,italics
# Escaped characters (`x)
style.ahk1.3=fore:#FF8000,bold

s4ahk.style.escape=fore:#FF8000,bold
# Operator
style.ahk1.4=fore:#7F200F,bold

# Expression assignement operator
style.ahk1.5=fore:#FF4F00,bold

s4ahk.style.operator=fore:#FF4F00,bold
# String
style.ahk1.6=fore:#404040,bold

s4ahk.style.string=fore:#404040,bold
# Number
style.ahk1.7=fore:#2F4F7F,bold

# Identifier (variable & function call)
# Not used by the lexer but by the style below and by hotkeys
style.ahk1.8=fore:#CF2F0F

# Variable dereferencing %varName%
style.ahk1.9=$(style.ahk1.8),back:#E4FFE4,bold

# Label & Hotstrings (& Function definition?). Also defines a bit of style for hotkeys.
style.ahk1.10=fore:#000000,back:#FFFFA1

# Keyword - Flow of control
style.ahk1.11=fore:#480048,bold,italics

# Keyword - Commands
style.ahk1.12=fore:#004080,bold

# Keyword - Functions
style.ahk1.13=fore:#0F707F,italics

# Keyword - Directives
style.ahk1.14=fore:#F04020,bold,italics

# Keyword - Keys & buttons
style.ahk1.15=fore:#FF00FF,bold

# Keyword - Built-in Variables
style.ahk1.16=fore:#CF00CF,bold,italics

# Keyword - special parameters ("Keywords")
style.ahk1.17=fore:#0000FF,italics

# Keyword - User defined
style.ahk1.18=fore:#800020,bold

# Variable keyword (built-in) dereferencing %A_xxx%
style.ahk1.19=$(style.ahk1.16),back:#F9F9FF

# Error (unclosed string, unknown operator, invalid dereferencing, etc.)
style.ahk1.20=back:#FFC0C0
s4ahk.style.number=fore:#2F4F7F,bold
# Word operator/Reserved keyword
s4ahk.style.wordop=fore:#0000FF,italics
# Variable/Identifier
s4ahk.style.var=fore:#CF2F0F
# (v2) Function / (v1.x) Built-in function
s4ahk.style.func=fore:#0F707F,italics
# Directive
s4ahk.style.directive=fore:#F04020,bold,italics
# Label/Hotkey
s4ahk.style.label=fore:#000000,back:#FFFFA1
# Flow of control
s4ahk.style.flow=fore:#480048,bold,italics
# Built-in variable
s4ahk.style.biv=fore:#CF00CF,bold,italics
# (v2) Built-in function / (v1.x) Command
s4ahk.style.bif=fore:#004080,bold
# Syntax error
s4ahk.style.error=back:#FFC0C0

# Old styles for AutoHotkey v1.x code
s4ahk.style.old.key=fore:#FF00FF,bold
s4ahk.style.old.user=fore:#800020,bold
97 changes: 37 additions & 60 deletions source/newuser/Styles/Light.style.properties
Original file line number Diff line number Diff line change
@@ -1,72 +1,49 @@
# AutoHotkey syntax highlighting style for SciTE
# Light style
#
# July 25, 2010 - fincs
#

# Base (background, base font)
style.*.32=back:#FFFFFFF,font:Consolas,size:10
# New SciTE4AutoHotkey style format
s4ahk.style=1

# Default (everything not below: spaces, untyped parameters)
style.ahk1.0=fore:#000000
# Default text font
default.text.font=Consolas

# Line comment (; syntax)
style.ahk1.1=fore:#008000
# Base (background, base font)
style.*.32=font:$(default.text.font),back:#FFFFFFF,fore:#000000,size:10

# Default style
s4ahk.style.default=
# Line comment (; syntax)
s4ahk.style.comment.line=fore:#008000
# Block comment (/*...*/ syntax)
style.ahk1.2=fore:#008000

s4ahk.style.comment.block=fore:#008000
# Escaped characters (`x)
style.ahk1.3=fore:#F35555,italics

s4ahk.style.escape=fore:#F35555,italics
# Operator
style.ahk1.4=fore:#000000

# Expression assignement operator
style.ahk1.5=fore:#000000

s4ahk.style.operator=
# String
style.ahk1.6=fore:#A31515

s4ahk.style.string=fore:#A31515
# Number
style.ahk1.7=fore:#000080

# Identifier (variable & function call)
# Not used by the lexer but by the style below and by hotkeys
style.ahk1.8=fore:#000000,bold

# Variable dereferencing %varName%
style.ahk1.9=$(style.ahk1.8)

# Label & Hotstrings (& Function definition?). Also defines a bit of style for hotkeys.
style.ahk1.10=fore:#000000,bold

# Keyword - Flow of control
style.ahk1.11=fore:#000080

# Keyword - Commands
style.ahk1.12=fore:#000080

# Keyword - Functions
style.ahk1.13=fore:#0F707F

# Keyword - Directives
style.ahk1.14=fore:#F04020,bold

# Keyword - Keys & buttons
style.ahk1.15=fore:#FF00FF,bold

# Keyword - Built-in Variables
style.ahk1.16=fore:#0000FF

# Keyword - special parameters ("Keywords")
style.ahk1.17=fore:#0000FF

# Keyword - User defined
style.ahk1.18=fore:#800020,bold

# Variable keyword (built-in) dereferencing %A_xxx%
style.ahk1.19=$(style.ahk1.16)

# Error (unclosed string, unknown operator, invalid dereferencing, etc.)
style.ahk1.20=back:#FFC0C0
s4ahk.style.number=fore:#000080
# Word operator/Reserved keyword
s4ahk.style.wordop=fore:#0000FF
# Variable/Identifier
s4ahk.style.var=bold
# (v2) Function / (v1.x) Built-in function
s4ahk.style.func=fore:#0F707F
# Directive
s4ahk.style.directive=fore:#F04020,bold
# Label/Hotkey
s4ahk.style.label=bold
# Flow of control
s4ahk.style.flow=fore:#000080
# Built-in variable
s4ahk.style.biv=fore:#0000FF
# (v2) Built-in function / (v1.x) Command
s4ahk.style.bif=fore:#000080
# Syntax error
s4ahk.style.error=back:#FFC0C0

# Old styles for AutoHotkey v1.x code
s4ahk.style.old.key=fore:#FF00FF,bold
s4ahk.style.old.user=fore:#800020,bold
Loading

0 comments on commit c5c326e

Please sign in to comment.