Representation of a cookie. For cookies received by the server as Cookie
header values only name and value properties will be set. When building a
cookie for the 'set-cookie' header in the server and when receiving cookies
in the client as 'set-cookie' headers all fields can be used.
Lua supports multivariable assignment.
Therefore it supports multivariable declarations.
The values are determined at runtime and follow
the specification here:
https://www.lua.org/pil/5.1.html
A very simple LUA evaluator using
a basic implementation of the standard
runtime StdRuntime. Can be used
whereever EvaluatorMixin is expected.
If someone wants to get started using this library
this is what they want to use.
The generic variant of lua's for-loop control structure.
Unlike the step-wise variant, this evaluates exprs
and stores them in vars following the multi-variable
assignment rules in this language. That is, if there are
too many returned results and not enough vars, then
the remaining vars will be nil.
This class facilitates overriding HttpClient with a mock implementation.
It should be extended by another class in client code with overrides
that construct a mock implementation. The implementation in this base class
defaults to the actual HttpClient implementation. For example:
Represents a linked list of conditional statements.
Consider the chain if -> elif -> elif -> else.
Therefore else statements are IfStmt without an expr.
See IfStmt.terminalElse constructor.
A type to represent if the callstack was unwound b/c of
the lua break keyword. A break statement can only
be inside a loop construct like for, while, and repeat.
The parser must report a break statement outside of a loop
so the runtime can bubble up out of the construct safely while
visiting all loop nodes.
The configuration class for LuaObject.doc instances.
To add documentation use the LuaDoc constructor.
Provide a category and the generated docs will group it with
those objects sharing the same category.
To omit the LuaObject from the generated docs, use LuaDoc.skip.
Represents a lua object for analyzing irregardless
if it is a well-defined variable or value.
This permits any visitor to look pass semantic errors
and continue marching through the grapheme.
A type that represents a lua thread.
It only stores the address addr used by the evaluator.
This type is used to distinguish a LuaObject.value
from other types.
A NetworkInterface represents an active network interface on the current
system. It contains a list of InterfaceAddresses that are bound to the
interface.
Represents identifiers in lua.
Anything that is not a keyword or an expression
is likely an identifier like a variable name or
table fields. The spec defines labels as identifiers
but those are encoded in this lib by GotoLabelStmt.
The object containing the certificates to trust when making
a secure client connection, and the certificate chain and
private key to serve from a secure server.
This abstraction visits every node class variant.
Visitors are the staple of this runtime implementation.
They can be used to implement semantic checks as well
as implement runtimes. Additionally custom visitors c
an walk the AST of a program and generate lua bytecode.
Strong type enumerations for all possible internal lua primitives.
LuaType.unresolved is used for strong type deduction.
LuaType.ref is used to help identify control flow.
All of the others are the expected user-facing lua types.
Creates an evaluator satisfying EvaluatorMixin via constructor.
Then passes ast into EvaluatorMixin.visitAST to parse
and evaluate the scriptlet or program.