Subversion Repositories Kolibri OS

Rev

Rev 9413 | Rev 9671 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 9413 Rev 9659
Line 1... Line 1...
1
(*
1
(*
2
    Copyright 2021 Anton Krotov
2
    Copyright 2021, 2022 Anton Krotov
Line 3... Line 3...
3
 
3
 
Line 4... Line 4...
4
    This file is part of CEdit.
4
    This file is part of CEdit.
5
 
5
 
Line 213... Line 213...
213
        END
213
        END
214
    END
214
    END
215
END C;
215
END C;
Line 216... Line -...
216
 
-
 
217
 
-
 
218
PROCEDURE getChar (line: tLine; i: INTEGER): WCHAR;
-
 
219
VAR
-
 
220
    res: WCHAR;
-
 
221
BEGIN
-
 
222
    IF i >= line.length THEN
-
 
223
        res := 0X
-
 
224
    ELSE
-
 
225
        res := Lines.getChar(line, i)
-
 
226
    END
-
 
227
    RETURN res
-
 
228
END getChar;
-
 
229
 
216
 
230
 
217
 
231
PROCEDURE LuaLong* (line: tLine; pos: INTEGER): INTEGER;
218
PROCEDURE LuaLong* (line: tLine; pos: INTEGER): INTEGER;
232
VAR
219
VAR
233
    res: INTEGER;
220
    res: INTEGER;
234
BEGIN
221
BEGIN
235
    res := -1;
222
    res := -1;
236
    IF getChar(line, pos) = "[" THEN
223
    IF Lines.getChar(line, pos) = "[" THEN
237
        INC(pos);
224
        INC(pos);
238
        WHILE getChar(line, pos) = "=" DO
225
        WHILE Lines.getChar(line, pos) = "=" DO
239
            INC(res);
226
            INC(res);
240
            INC(pos)
227
            INC(pos)
241
        END;
228
        END;
242
        IF getChar(line, pos) = "[" THEN
229
        IF Lines.getChar(line, pos) = "[" THEN
243
            INC(res)
230
            INC(res)
244
        ELSE
231
        ELSE
245
            res := -1
232
            res := -1