hetu_script library

Hetu Script A lightweight scripting language for embedding in Flutter apps.

Copyright (C) 2022 Shao, Ran chengfubeiming@live.com Licensed under the MIT License. http://www.opensource.org/licenses/mit-license.php

Classes

CharacterLocation
The location of a character represented as a line and column pair.
CompilerConfig
ErrorConfig
Error processor configuration derived from analysis (or embedder) options.
ErrorHandlerConfig
ErrorProcessor
Process errors by filtering or changing associated ErrorSeverity.
ErrorSeverity
The severity of an message.
ErrorType
The type of an HTError.
FutureExecution
A wrapper class for the bytecode interpreter to run a certain task in a future.
Hetu
A wrapper class for sourceContext, lexicon, parser, bundler, analyzer, compiler and interpreter to make them work together.
HetuConfig
HTBundler
Handle import statement in sources and bundle all related sources into a single compilation
HTCompiler
Compiles source code into bytecode.
HTContext
The exucution context of the bytecode interpreter.
HTDefaultLexicon
Default lexicon implementation used by Hetu.
HTDefaultParser
Default parser implementation used by Hetu.
HTEntity
A interface for store and access symbols from a collection.
HTError
HTErrorHandler
Abstract error handler class
HTErrorHandlerImpl
Default error handler implementation
HTFilterConfig
HTInterpreter
A bytecode implementation of Hetu Script interpreter
HTIntrinsicType
HTLexer
HTLexicon
Lexicon used by Hetu,
HTLocale
HTLocaleEnglish
HTLocaleSimplifiedChinese
HTOverlayContext
HTOverlayContext are a virtual set of files that not neccessarily exists as physical files.
HTOverlayContextManager
HTParser
A general parser, with abstract method to parse a token list or string content.
HTRegIdx
HTResource
HTResourceContext<T>
HTResourceContext are a set of resources, each has a unique path. It could be a physical folder, a virtual collection in memory, an URL, or a remote database... any thing that provide create, read, update, delete services could be a resource context.
HTSource
A piece of code, with extra informations like: fullName, type, lineInfo, etc.
HTSourceManager<RT, CT extends HTResourceContext<RT>>
Manage a set of resources. A resource could be hetu source, yaml, json... etc. Extends this class and provide an implementation of createContext to manage a certain kind of HTResourceContext
HTType
Type is basically a set of things. It is used to check errors in code.
HTTypeAny
A type is both top and bottom, only used on declaration for analysis.
HTTypeFunction
HTTypeNamespace
HTTypeNever
A bottom type. A function whose return type is never cannot return. For example by throwing an error or looping forever.
HTTypeNull
A zero type. It's the type of runtime null value. You cannot get this type via expression or declaration.
HTTypeUnknown
A top type, basically a type-safe version of the type any.
HTTypeVoid
A empty type. A function whose return type is empty. It may contain return statement, but cannot return any value. And you cannot use the function call result in any operation.
HTValueSource
A value, however it can be imported like a source. Typically a json file, which is a HTStruct value in Hetu Script.
InternalIdentifier
InterpreterConfig
Collection of config of bytecode interpreter.
LineInfo
Information about line and column information within a source file.
ParserConfig
Semantic
SourceRange
A source range defines a range of characters within source code.

Enums

ErrorCode
FunctionCategory
Function types
HTResourceType
ParseStyle
Determines how to parse a piece of code
StackFrameStrategy
Determines how the interepreter deal with stack frame information when context are changed.

Mixins

InterpreterRef
Mixin for classes that want to hold a ref of a bytecode interpreter

Constants

kStackTraceDisplayCountLimit → const int
severityMap → const Map<String, ErrorSeverity>
String identifiers mapped to associated severities.

Properties

kHetuVersion → Version
final

Typedefs

HTErrorHandlerCallback = void Function(Object error, {Object? externalStackTrace})
RootUpdatedCallback = void Function()