Code Monkey home page Code Monkey logo

polyblocks's Introduction

Polyblocks

Syntax

Polyblock works in two modes: the embedded mode, where the block syntax is embedded in a language's syntax, and the standalone mode, where the file is encoded primarily with the Polyblock syntax.

In standalone mode, the parsing is done line by line, using indentation to determine where the content belongs:

  • Block declarations all start with an unindented @ followed by the block name and some optional data.
  • Block content all start with an indented value (by default, one tab).
  • Comments are unindented and start with a #.

In embedded mode, the parsing is also done on a line-by-line basis, with the following differences:

  • Block declarations all start with a customizable language-specific prefix (# for shell-like, * for C-Like languages) followed by the @, like in the standalone mode.
  • Block content must follow directly after the block declaration.
  • Host language code is included as a verbatim block.

Block types

@texto
@h2 Section title
@javascript {hidden}
@component controls/logger <- input <- log
@component controls/input -> value -> name

https://thepaciellogroup.github.io/cupper/patterns/coding/color-palettes/

polyblocks's People

Contributors

sebastien avatar

Watchers

 avatar James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.