Class l2df.class.parser
Base class for parsers.
Inherited from l2df.Class.
Info:
- Copyright: Atom-TM 2019
- Author: Abelidze
Functions
Parser:parseFile(filepath[, obj]) | Base method for parsing file. |
Parser:parse(str[, obj]) | Base method for parsing string. |
Parser:parseScalar(str) | Method that tries to deduce type for given string. |
Parser:dumpScalar(value) | Method for converting scalar value to string. |
Parser:dumpToFile(filepath, data) | Base method for dumping table to file. |
Parser:dump(data) | Base method for dumping table. |
Functions
Methods- Parser:parseFile(filepath[, obj])
-
Base method for parsing file.
You can extend existing object by passing it as second parameter.
Parameters:
Returns:
- Parser:parse(str[, obj])
-
Base method for parsing string.
You can extend existing object by passing it as second parameter.
Parameters:
Returns:
- Parser:parseScalar(str)
-
Method that tries to deduce type for given string. Returns casted value.
Parameters:
- str string String for parsing.
Returns:
-
mixed
- Parser:dumpScalar(value)
-
Method for converting scalar value to string.
Parameters:
- value string Value for dumping.
Returns:
- Parser:dumpToFile(filepath, data)
-
Base method for dumping table to file.
Parameters:
Returns:
- Parser:dump(data)
-
Base method for dumping table.
Parameters:
- data table Table for dumping.
Returns: