language-openscad-0.1.6: A simple parser for OpenSCAD

Safe HaskellNone
LanguageHaskell2010

Language.OpenSCAD

Contents

Synopsis

Basic parsing

stripComments :: ByteString -> ByteString Source

Strip the comments from and OpenSCAD source file

parseFile :: ByteString -> Either String [TopLevel] Source

Parse an OpenSCAD source file

Primitives

newtype Ident Source

An identifier

Constructors

Ident String 

Instances

ident :: Parser Ident Source

Parse an identifier

data TopLevel Source

Things which can appear at the top level of an OpenSCAD source file

Instances

data Scad Source

A OpenSCAD scope

Instances

Expressions

data Argument a Source

An item in an argument list

Constructors

Argument a

Just a plain value

NamedArgument Ident a

A named argument

Instances

Show a => Show (Argument a) 

data Range a Source

Range start end step denotes a list starting at start and stopping at end with increments of step.

Constructors

Range a a (Maybe a) 

Instances

Show a => Show (Range a)