logo-command-parser
TypeScript icon, indicating that this package has built-in type declarations

0.3.0 • Public • Published

Command parser for LOGO

This is a LOGO command parser build with PEG.js

Example

This code

REPEAT 4 [
  FD 10 RT 90
]

will output this

[
   {
      "command": "FD",
      "args": [
         10
      ]
   },
   {
      "command": "RT",
      "args": [
         90
      ]
   },
   {
      "command": "FD",
      "args": [
         10
      ]
   },
   {
      "command": "RT",
      "args": [
         90
      ]
   },
   {
      "command": "FD",
      "args": [
         10
      ]
   },
   {
      "command": "RT",
      "args": [
         90
      ]
   },
   {
      "command": "FD",
      "args": [
         10
      ]
   },
   {
      "command": "RT",
      "args": [
         90
      ]
   }
]

Package Sidebar

Install

npm i logo-command-parser

Weekly Downloads

4

Version

0.3.0

License

MIT

Last publish

Collaborators

  • katsew