DVT e Language IDE User Guide
Rev. 24.1.5, 13 March 2024

35.11 Syntax Coloring

Source code is colored in the DVT editor. Some language constructs are colored based on a syntactical analysis of the code, while others require a more elaborate semantic analysis, as detailed in the table below. Semantic coloring is only performed when the source code is compiled.

Category Requires compilation Details
ArgumentsyFunction arguments
Comment Hyperlinks  
Comment PragmasyCompilation is required for Custom Pragmas
Comments  
ConstantsyConst fields, enum members and predefined constants like TRUE, FALSE
Default Any word which does not belong to other categories
Define Groups Syntactical category tag of a define as or define as computed macro
Eventsy 
Expansion Literals  
Expansion Replacements  
FieldsyStruct fields and union fields
HDL Paths  
Javadoc Tags  
Keyphrases Combination of keywords: "is a", "keep for each"
Keywords  
Labelsy 
MethodsyMethods and time consuming methods
Numbers  
Ports - Input, Inouty 
Ports - Outputy 
Preprocessing Preprocessing #macros
Replacement Terms Constructs like <any>, <exp>, <type>
Section Start/End Begin or end of code section <' and '>
String Literals  
Task Tags  
Typesyscalar types, units, structs
Template Identifiers  
Time Units Time units like ms, ns or ps
Variablesy 

You can change the coloring style for each of the categories. Go to Window > Preferences > DVT > e Language > Editor > Syntax Coloring, select the category you wish to modify from the list and set the color and font style.

A code sample in the Syntax Coloring preference page helps you preview the changes instantly. The default style is shown below:

Note: Inside macro definitions and macro calls, only syntactic coloring is performed.