Syntax highlighting
From Free Pascal wiki
Jump to navigationJump to search
│
English (en) │
suomi (fi) │
polski (pl) │
Syntax highlighting is a feature which displays text in different colors and fonts according to the category of terms. It is the feature of text editors that are used for programming (source code), scripting, markup languages (HTML, JSON, or XML), or configuration files (LFM, or Ini-files).
Example
program Project1;
const
text = 'Press any key to continue!';
{ Computer programmers historically used 'Press any key to continue' as
a prompt to the user when it was necessary to pause processing.
The system would resume after the user pressed any keyboard button. }
begin
WriteLn(text);
ReadLn;
end.
In the Pascal example, the editor has recognized the keywords program, const, begin, and end. The comment is also highlighted in a specific manner to distinguish it from working code.
Components
Icon | Component | Description |
---|---|---|
TSynPasSyn | Generic Pascal syntax-highlighting | |
TSynFreePascalSyn | Free-Pascal syntax-highlighting | |
TSynCppSyn | C++ syntax-highlighting | |
TSynJavaSyn | Java syntax-highlighting | |
TSynPerlSyn | perl syntax-highlighting | |
TSynHTMLSyn | HTML syntax-highlighting | |
TSynXMLSyn | XML syntax-highlighting | |
TSynLFMSyn | LFM syntax-highlighting | |
TSynDiffSyn | ||
TSynUNIXShellScriptSyn | Unix shell syntax-highlighting | |
TSynCssSyn | CSS syntax-highlighting | |
TSynPHPSyn | PHP syntax-highlighting | |
TSynTeXSyn | (La)TeX syntax-highlighting | |
TSynSQLSyn | SQL syntax-highlighting | |
TSynPythonSyn | Python syntax-highlighting | |
TSynVBSyn | Visual Basic syntax-highlighting | |
TSynAnySyn | ||
TSynMultiSyn | ||
TSynBatSyn | Batch-file syntax-highlighting | |
TSynIniSyn | INI-file syntax-highlighting | |
TSynPoSyn |