1.0.11 • Published 7 months ago

@tearflake/sexpression v1.0.11

Weekly downloads
-
License
MIT
Repository
github
Last release
7 months ago

sexpression v1.0.11

S-expression is a formal language for representing data and code. Sexpression project is an implementation of S-expression language parser.

project specifics

This package contains a version of S-expression parser written in Javascript. Beside ordinary S-expression support, it features peculiar style comments and indent sensitive multi-line strings. Shortly, we expose all of its main features by the following example:

///
this is a
multi-line
comment
///

(
    atom
    
    (
        /this is a comment/
        this is a list
        (
            /one more comment/ one more list /also a comment/
        )
    )
    
    "this is a unicode string \u2717 \u2714"
    
    (more atoms)
    
    """
    this is a
    multi-line
    string
    """
)

resources

javascript API access

Sexpression may bring its functionality through javascript API, both in Node.js and browser.

To access the API from Node.js, install it by: npm i @tearflake/sexpression, and include the following line in your code:

const Sexpression = require('@tearflake/sexpression');

To access the API from browser, clone this repository from GitHub: git clone https://github.com/tearflake/sexpression, and include the following line in your code:

<script src="path-to-sexpression-package/src/sexpression.js"></script>

Below, in both cases, use the package as:

var arrOutput = Sexpression.parse('(a b c)');
if (!arrOutput.err) {
    console.log(JSON.stringify(arrOutput, null, 4));
}
1.0.9

8 months ago

1.0.11

7 months ago

1.0.10

8 months ago

1.0.8

8 months ago

1.0.7

9 months ago

1.0.6

9 months ago

1.0.5

9 months ago

1.0.4

9 months ago

2.0.0

10 months ago

1.0.3

10 months ago

1.0.2

10 months ago

1.0.1

10 months ago

1.0.0

10 months ago

0.1.2

10 months ago

0.1.1

10 months ago

0.1.0

10 months ago