File: m_basic.fte

package info (click to toggle)
efte 1.1-4
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 3,800 kB
  • sloc: cpp: 43,587; ansic: 1,228; makefile: 271; objc: 92; sh: 40
file content (104 lines) | stat: -rw-r--r-- 2,948 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#
# eFTE mode for Basic
#   build from docs on FreeBasic (http://www.freebasic.net)
#

colorize BASIC {
    SyntaxParser = "SIMPLE";

    color {
        { "Normal",      "Editor_Default" },
        { "Function",    "Lang_Function" },
        { "Number",      "Lang_DecimalNumber" },
        { "Comment",     "Lang_Comment" },
        { "String",      "Lang_String" },
        { "Punctuation", "Lang_Punctuation" },
    };

    keyword "Editor_Keywords" {
        # Generic
        "with",

        # Variable Declarations
        "dim", "const", "scope", "static", "shared", "var",

        # User defined types
        "enum", "type", "union", "field", "constructor", "deconstructor",
        "function", "operator", "property", "sub", "static", "const",

        # Control flow statements
        "goto", "gosub", "on", "return", "if", "end", "else", "select",
        "case", "exit", "while", "wend", "for", "next", "do", "loop",
        "continue", "then",

        # Procedures
        "declare", "overload", "alias", "export", "lib", "byref", "byval",
        "any", "VA_FIRST", "VA_ARG", "VA_NEXT", "call", "stdcall", "cdecl",
        "pascal", "as",

        # Modularizing
        "common", "dylibfree", "dylibload", "dylibsymbol", "extern",
        "import", "namespace", "using",

        # Error Handling
        "error"

    };

    keyword "Editor_Keywords2" {
        "this", "public", "private", "protected"
    };

    keyword "Editor_Keywords3" {
        # Operators
        "let", "mod", "and", "eqv", "imp", "or", "xor", "shl", "shr",
        "not", "andalso", "orelse", "strptr", "varptr", "procptr",
        "new", "delete"
    };

    h_state 0 { "Normal" }
    h_trans { 1, "-s", /_a-zA-Z&$/, "Normal" }
    h_trans { 2, "<", "''", "Comment" }
    h_trans { 3, "", "\"", "String" }
    h_trans { 4, "", "'", "String" }
    h_trans { 5, "s", "-+0-9eE+-", "Number" }
    h_trans { 0, "S", /_a-zA-Z0-9$/, "Punctuation" }

    h_state 1 { "Normal" }
    h_trans { 0, "$", "", "Normal" }
    h_wtype { 1, 1, 0, "", /_a-zA-Z0-9$/ }

    h_state 2 { "Comment" }
    h_trans { 0, "$", "", "String" }

    h_state 3 { "String" }
    h_trans { 0, "", "\"", "String" }
    h_trans { 0, "$", "", "String" }
    h_trans { 3, "Qq", "\\", "String" }
    
    h_state 4 { "String" }
    h_trans { 0, "", "'", "String" }
    h_trans { 0, "$", "", "String" }
    h_trans { 4, "Qq", "\\", "String" }
    
    h_state 5 { "Number" }
    h_trans { 0, "-S", "-+0-9eE+-", "Normal" }
    h_trans { 0, "$", "", "Normal" }
}

mode BASIC: SOURCE {
	FileNameRx         = /\c\.{{bas}|{bi}}$/;
    HilitOn            = 1;
    Colorizer          = "BASIC";
    AutoIndent         = 1;
    IndentMode         = "PLAIN";
    MatchCase          = 0;
    Trim               = 1;
    MultiLineHilit     = 1;
    AutoHilitParen     = 1;
    SaveFolds          = 0;
    
    RoutineRegexp      = /^\s*{{sub}|{function}|{type}}\s+/;
}

oinclude 'mym_basic.fte';