LibTagCompiler-2.0

A library to provide configuration via simple tag syntax.

LibTagCompiler-2.0 is a library allowing configuration via tags, specifically useful for display components, allowing easy arrangement and modification of said display. It is currently used in Assessment and Aloft.

Syntax

TextTag       := { Statement } @
RawTag        := RValue @
NumberTag     := RValue @

Statement     := literal | "[" RValue "]"
RValue        := Logical
Logical       := Relation { "&" | "|" } Relation
Relation      := Concat [ ("==" | "~=" | ">" | "<" | "<=" | ">=") Concat ]
Concat        := Expression { ("."  | "..") Expression }
Expression    := Term { ("+" | "-") Term }
Factor        := Chain { ("*" | "/") Chain }
Chain         := Unary { ":" Unary }
Unary         := [ "~" | "-" ] Primary
Primary       := ConstantNumber | ConstantString | Identifier ["(" ParameterList ")"] | "(" RValue ")"
ParameterList := RValue {, RValue }

Usage

TagCompiler:Compile(tag, tagData, resultType)
tagData is a structure that optionally has:
    tagname.data
    tagname.events
    tagname.overrideEvents
    tagname.guaranteeResult
    tagname.noGuaranteeChange
    tagname.numeric
    parameterTypes        -- Array of either "raw", "number" or "string"
And must have one of:
    tagname.tableData
    tagname.string
    tagname.method        -- Will be called with the input parameter, prior result and any parameters
    tagname.compileString

For methods or compileStrings that require parameters, it must contain
    tagname.parameterTypes

resultType is "string", "number", or "raw"

The result of CreateTag is a table with:
    data   - a list of data elements required, which is all of the tag's .data lists
    events - a list of the events required, which is a list of all tag's .events minus .overrideEvents
    method - call with input parameter
    tag    - the tag used

The LibTagCompiler-2.0 Team

profile avatar
Owner
  • 8
    Followers
  • 63
    Projects
  • 15.1M
    Downloads

More from PhanxView all

  • Broker Played Time project image

    Broker Played Time

    • 296.4K
    • Addons

    DataBroker plugin to track played time across all your characters.

    • 296.4K
    • April 22, 2026
    • Addons
  • LibRealmInfo project image

    LibRealmInfo

    • 21.0K
    • Addons

    Library to provide information about realms.

    • 21.0K
    • January 21, 2021
    • Addons
  • Action Bar Profiles (Saver) project image

    Action Bar Profiles (Saver)

    • 171.2K
    • Addons

    Add-on that allows you to setup and quickly switch between different profiles of your action bars

    • 171.2K
    • October 19, 2020
    • Addons
  • Diplomancer project image

    Diplomancer

    • 7.1K
    • Addons

    Changes your watched faction reputation based on your current location.

    • 7.1K
    • September 18, 2016
    • Addons
    • +2
  • Broker Played Time project image

    Broker Played Time

    • 296.4K
    • Addons

    DataBroker plugin to track played time across all your characters.

    • 296.4K
    • April 22, 2026
    • Addons
  • LibRealmInfo project image

    LibRealmInfo

    • 21.0K
    • Addons

    Library to provide information about realms.

    • 21.0K
    • January 21, 2021
    • Addons
  • Action Bar Profiles (Saver) project image

    Action Bar Profiles (Saver)

    • 171.2K
    • Addons

    Add-on that allows you to setup and quickly switch between different profiles of your action bars

    • 171.2K
    • October 19, 2020
    • Addons
  • Diplomancer project image

    Diplomancer

    • 7.1K
    • Addons

    Changes your watched faction reputation based on your current location.

    • 7.1K
    • September 18, 2016
    • Addons
    • +2