# CLARION
# Contributed by: thoye@sn.no (Thore Harald Hoye)

colorize CLARION {
    SyntaxParser        = 'Ada'; # ?

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

    keyword 'Editor_Keywords' {
        'accept', 'and', 'begin', 'break', 'by', 'case', 'compile', 'cycle',
        'do','eject', 'else', 'elsif', 'embed', 'end', 'endembed', 'execute',
        'exit', 'function', 'goto', 'if', 'include', 'loop', 'member', 'not',
        'of', 'omit', 'or', 'orof', 'procedure', 'program', 'return',
        'routine', 'section', 'then', 'times', 'to', 'until', 'while', 'xor',
    };

    keyword 'Editor_Keywords4' {
        'application', 'code', 'detail', 'file', 'footer', 'form', 'group',
        'header', 'item', 'map', 'menu', 'menubar', 'module', 'option',
        'queue', 'record', 'report', 'subtitle', 'title', 'toolbar', 'view',
        'window',
    };

    keyword 'Editor_Keywords2' {
        'localrequest', 'originalrequest', 'localresponse', 'windowopened',
        'windowinitialized', 'forcerefresh', 'currenttab', 'globalrequest',
        'requestcancelled', 'globalresponse', 'selectrecord', 'recordfiltered',
    };

    keyword 'Editor_Keywords3' {
        'initializewindow', 'refreshwindow', 'syncwindow', 'main',
    };

    keyword 'Editor_Keywords5' {
        'byte', 'short', 'ushort', 'long', 'ulong', 'sreal', 'real', 'bfloat4',
        'bfloat8', 'date', 'time', 'string', 'decimal', 'pdecimal', 'pstring',
        'cstring', 'group',
    };
}

mode CLARION: PLAIN {       # CLARION mode
    FileNameRx          = '\\.\\c{CLW}$';
    Colorizer           = 'CLARION';
    HilitOn             = 1;
    AutoIndent          = 1;
    IndentMode          = 'PLAIN';
    MatchCase           = 1;
    Trim                = 1;
    MultiLineHilit      = 0;

    RoutineRegexp       = /^\s*{function}|{procedure}\s/;

#    SaveFolds           = 2;      # save fold info at end of line
#    CommentStart        = ' --';
#    CommentEnd          = '';
}
