Adding Language Support: 2.0 The Language Specific Macro File
Language specific functions are placed in a language specific macro file. The language specific macro file is usually named after the language it supports. For example, in the Multi-Edit src directory you will find the following language specific macro files:
File Prefix Language Ada.s - Ada Ada Asm.s - Asm Assembly language Basic.s - Bas BASIC C.s - C C/C++ and CMac CMac.s - Cmac Cmac Cobol.s - Cob COBOL CSharp.s - Csharp C# CSup.s - Csup C/C++ DBase.s - Dba dBase Fortran.s - For,F77 FORTRAN 66/77 Java.s - Java Java JavaScript.s - JS JavaScript Lisp.s - Lisp Lisp Lua.s - Lua Lua MatLab.s - Mat Matlab Modula_2.s - M2 Modula-2 Pascal.s - Pas Pascal Progress.s - Prog Progress Ruby.s - Ruby Ruby VBasic.s - VBas Visual Basic Verilog.s - Vlog Verilog Vhdl.s - Vhdl VHDL
Each language macro file has some or all of the following macros. The macro names are prefixed by the language prefix, which is usually the first 3 or 4 letters of the language.
<lang>SetProperties - Dialog to set language specific properties <lang>GetProperties - Get the language specific properties <lang>InitMatch - Sets the language specific construct matching globals <lang>Init - Initializes language specific support <lang>Indent - Performs language specific smart indent _<lang>GetMatchPat - Locate a language specific match pattern <lang>Match - Performs language specific construct matching <lang>FindTag - Generate language specific tags
Example for the Ada language:
AdaSetProperties - Dialog to set language specific properties AdaGetProperties - Get the language specific properties AdaInitMatch - Sets the language specific construct matching globals AdaInit - Initializes language specific support AdaIndent - Performs language specific smart indent _AdaGetMatchPat - Locate a language specific match pattern AdaMatch - Performs language specific construct matching AdaFindTag - Generate language specific tags
Future posts will discuss each macro.