Search Results for

    Show / Hide Table of Contents

    Class FeedbackHelpers

    A collection of functions that help produce wonderful diagnostics, geared particularly toward LNodes.

    Inheritance
    object
    FeedbackHelpers
    Inherited Members
    object.Equals(object)
    object.Equals(object, object)
    object.GetHashCode()
    object.GetType()
    object.MemberwiseClone()
    object.ReferenceEquals(object, object)
    object.ToString()
    Namespace: Flame.Ir
    Assembly: Flame.Ir.dll
    Syntax
    public static class FeedbackHelpers

    Methods

    | Edit this page View Source

    AssertArgCount(LNode, int, ILog)

    Asserts that a node has a particular number of arguments.

    Declaration
    public static bool AssertArgCount(LNode node, int argCount, ILog log)
    Parameters
    Type Name Description
    LNode node

    A node to inspect.

    int argCount

    The number of arguments to expect.

    ILog log

    A log to send error and warning messages to.

    Returns
    Type Description
    bool

    true if the node has the desired number of arguments; otherwise, false.

    | Edit this page View Source

    AssertIsCall(LNode, ILog)

    Asserts that a node is a call. If it is not, then a message is sent to a log.

    Declaration
    public static bool AssertIsCall(LNode node, ILog log)
    Parameters
    Type Name Description
    LNode node

    A node to inspect.

    ILog log

    A log to send error and warning messages to.

    Returns
    Type Description
    bool

    true if the node is a call; otherwise, false.

    | Edit this page View Source

    AssertIsId(LNode, ILog)

    Asserts that a node is an id. If it is not, then a message is sent to a log.

    Declaration
    public static bool AssertIsId(LNode node, ILog log)
    Parameters
    Type Name Description
    LNode node

    A node to inspect.

    ILog log

    A log to send error and warning messages to.

    Returns
    Type Description
    bool

    true if the node is an id; otherwise, false.

    | Edit this page View Source

    AssertIsLiteral(LNode, ILog)

    Asserts that a node is a literal. If it is not, then a message is sent to a log.

    Declaration
    public static bool AssertIsLiteral(LNode node, ILog log)
    Parameters
    Type Name Description
    LNode node

    A node to inspect.

    ILog log

    A log to send error and warning messages to.

    Returns
    Type Description
    bool

    true if the node is a literal; otherwise, false.

    | Edit this page View Source

    AssertMinArgCount(LNode, int, ILog)

    Asserts that a node has at least a particular number of arguments.

    Declaration
    public static bool AssertMinArgCount(LNode node, int argCount, ILog log)
    Parameters
    Type Name Description
    LNode node

    A node to inspect.

    int argCount

    The minumum number of arguments to expect.

    ILog log

    A log to send error and warning messages to.

    Returns
    Type Description
    bool

    true if the node has at least the desired number of arguments; otherwise, false.

    | Edit this page View Source

    AssertOfKind(LNode, LNodeKind, ILog)

    Asserts that a node has a particular kind. If it does not, then a message is sent to a log.

    Declaration
    public static bool AssertOfKind(LNode node, LNodeKind kind, ILog log)
    Parameters
    Type Name Description
    LNode node

    A node to inspect.

    LNodeKind kind

    The expected node kind for node.

    ILog log

    A log to send error and warning messages to.

    Returns
    Type Description
    bool

    true if the node is of the specified kind; otherwise, false.

    | Edit this page View Source

    LogSyntaxError(ILog, LNode, MarkupNode)

    Reports a syntax error.

    Declaration
    public static void LogSyntaxError(this ILog log, LNode node, MarkupNode message)
    Parameters
    Type Name Description
    ILog log

    The log to which the error is sent.

    LNode node

    The offending node.

    MarkupNode message

    The error message that specifies what went wrong.

    | Edit this page View Source

    Print(LNode)

    Gets a pretty string representation for a node.

    Declaration
    public static string Print(LNode node)
    Parameters
    Type Name Description
    LNode node

    The node to print.

    Returns
    Type Description
    string

    A string representation.

    | Edit this page View Source

    QuoteEven(params MarkupNode[])

    Quotes even (second, fourth, sixth, ...) markup elements in bold and wraps the result in a sequence node.

    Declaration
    public static Sequence QuoteEven(params MarkupNode[] nodes)
    Parameters
    Type Name Description
    MarkupNode[] nodes

    The nodes to process.

    Returns
    Type Description
    Sequence

    A sequence container node.

    | Edit this page View Source

    SpellNodeKind(LNode)

    Gets a human-readable string that identifies a node's kind.

    Declaration
    public static string SpellNodeKind(LNode node)
    Parameters
    Type Name Description
    LNode node

    A node whose kind will be spelled out.

    Returns
    Type Description
    string

    A string that identifies the node's kind.

    | Edit this page View Source

    SpellNodeKind(LNodeKind)

    Gets a human-readable string that identifies a node kind.

    Declaration
    public static string SpellNodeKind(LNodeKind kind)
    Parameters
    Type Name Description
    LNodeKind kind

    A node kind to spell.

    Returns
    Type Description
    string

    A string that identifies the node kind.

    • Edit this page
    • View Source
    In this article
    Back to top Generated by DocFX