Gambas Documentation
Application Repository
Code Snippets
Compilation & Installation
Components
gb
gb.args
gb.cairo
gb.chart
gb.clipper
gb.complex
gb.compress
gb.crypt
gb.data
gb.db
gb.db.form
gb.db.mysql
gb.db.odbc
gb.db.postgresql
gb.db.sqlite2
gb.db.sqlite3
gb.dbus
gb.dbus.trayicon
gb.debug
gb.desktop
gb.desktop.gnome.keyring
gb.desktop.x11
gb.eval
Expression
Highlight
Added
Alternate
Analyze
Background
Breakpoint
Comment
Constant
Current
CurrentLine
Custom
DataType
Error
Escape
Function
Help
Highlight
IsFunction
Keyword
Label
LengthBefore
Normal
Number
Operator
Positions
Preprocessor
Purge
Removed
Selection
String
Symbol
Symbols
TextAfter
Types
System
gb.eval.highlight
gb.form
gb.form.dialog
gb.form.editor
gb.form.htmlview
gb.form.mdi
gb.form.print
gb.form.stock
gb.form.terminal
gb.gmp
gb.gsl
gb.gtk
gb.gtk.opengl
gb.gtk3
gb.gtk3.opengl
gb.gtk3.webview
gb.gui
gb.gui.opengl
gb.gui.qt
gb.gui.qt.ext
gb.gui.qt.opengl
gb.gui.qt.webkit
gb.gui.trayicon
gb.gui.webview
gb.hash
gb.highlight
gb.image
gb.image.effect
gb.image.imlib
gb.image.io
gb.inotify
gb.jit
gb.libxml
gb.logging
gb.map
gb.markdown
gb.media
gb.media.form
gb.memcached
gb.mime
gb.mongodb
gb.mysql
gb.ncurses
gb.net
gb.net.curl
gb.net.pop3
gb.net.smtp
gb.openal
gb.opengl
gb.opengl.glsl
gb.opengl.glu
gb.opengl.sge
gb.openssl
gb.option
gb.pcre
gb.pdf
gb.poppler
gb.qt4
gb.qt4.ext
gb.qt4.opengl
gb.qt4.webkit
gb.qt4.webview
gb.qt5
gb.qt5.ext
gb.qt5.opengl
gb.qt5.webkit
gb.qt5.webview
gb.qt6
gb.qt6.ext
gb.qt6.opengl
gb.qt6.webview
gb.report
gb.report2
gb.scanner
gb.sdl
gb.sdl.sound
gb.sdl2
gb.sdl2.audio
gb.settings
gb.signal
gb.term
gb.test
gb.util
gb.util.web
gb.v4l
gb.vb
gb.web
gb.web.feed
gb.web.form
gb.web.gui
gb.xml
gb.xml.html
gb.xml.rpc
gb.xml.xslt
Controls pictures
Deprecated components
Developer Documentation
Development Environment Documentation
Documents
Error Messages
Gambas Playground
How To's
Language Index
Language Overviews
Last Changes
Lexicon
README
Search the wiki
To Do
Topics
Tutorials
Wiki License
Wiki Manual

Highlight (gb.eval)

This class provides some useful features for analyzing and highlighting a line of Gambas code.

This class is static.

Constants
Added   This constant represents the style used for added lines, usually in "diff" files.
Alternate   This constant represents the style used for drawing an alternate background.
Background   This constant represents the style of the editor background.
Breakpoint   This constant represents the style used for drawing a line with a breakpoint.
Comment   This constant represents the style used for drawing comments.
Constant   This constant represents the style used for drawing constants.
Current   This constant represents the style used for drawing the next line to be executed.
CurrentLine   This constant represents the style used for highlighting the current line.
Custom   This constant is the first value that can be used for custom styles indexes.
DataType   This constant represents the style used for drawing datatypes.
Error   This constant represents the style used for drawing syntactically incorrect text.
Escape   This constant represents the style used for drawing escaped characters inside strings.
Function   This constant represents the style used for drawing subroutines, i.e. predefined functions.
Help   This constant represents the style used for drawing help lines.
Highlight   This constant represents the style used for drawing matching braces or brackets.
Keyword   This constant represents the style used for drawing keywords.
Label   This constant represents the style used for drawing labels.
Normal   This constant represents the style used for drawing normal text or text without syntax highlighting.
Number   This constant represents the style used for drawing numbers.
Operator   This constant represents the style used for drawing operators.
Preprocessor   This constant represents the style used for drawing preprocessor commands.
Removed   This constant represents the style used for removed lines, usually in "diff" files.
Selection   This constant represents the style used for drawing selected text.
String   This constant represents the style used for drawing strings.
Symbol   This constant represents the style used for drawing symbols.

Static properties
IsFunction   Return if the Analyze method detected a method declaration.
LengthBefore   Return how many characters were analyzed by the Analyze method before the possible rewrite.
Positions   Returns the position of each token, in bytes, after a call to the Analyze method.
Symbols   Returns the result of the Analyze method as an array of string tokens.
TextAfter   Returns the rewritten code line after a call to the Analyze method.
Types   Returns the type of each token after a call to the Analyze method.

Static methods
Analyze   Analyzes a Gambas code line.
Purge   Removes comments and/or strings from a Gambas code line.