/libconfig-parser-ts

Primary LanguageTypeScriptGNU General Public License v3.0GPL-3.0

a Libconfig Parser for js

Implemented after the Specs and powered by Sprache-js.

Implementation Status

  • Parsing whole files

    • read files
    • Comments
      • ignore them
      • Script-style comments # comment line
      • C++-style comments // comment line
      • C-style comments /* comment */
    • Include Directives (maximum of 10 levels)
  • Settings

    • Groups
    • Arrays
    • Lists
    • scalar value
      • Integer
        • hex notation
        • decimal notation
        • octal notation
        • signed Integers
      • 64-bit Integer (*ignores the 64bit part for now)
      • Float
        • Normal Floats
        • Signed Floats
        • Exponents
      • Boolean
      • Strings
        • Strings
        • Strings with escape sequences
        • Adjacent strings are automatically concatenated
        • Multiline string with <" and "> (Is not in the specs but used in the libconfig file I want to parse)
  • serialization of js objects to libconfig files

Stages/Steps/TODO:

  • Writing code and tests for parsing ✔️
  • Optimizing code for parsing
  • Writing code and tests for serialization to libconfig files
  • Documentation and examples

Quirks

  • You can do mixed number types (floats and its in same array) in Arrays which is not possible with normal libconfig

  • Multiline string with <" and "> are not in the official specs, but they are supported by this module.