Show / Hide Table of Contents

    Class FeedbackHelpers

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

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

    Methods

    | Improve this Doc View Source

    AssertArgCount(LNode, Int32, 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
    Loyc.Syntax.LNode node

    A node to inspect.

    System.Int32 argCount

    The number of arguments to expect.

    Pixie.ILog log

    A log to send error and warning messages to.

    Returns
    Type Description
    System.Boolean

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

    | Improve this Doc 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
    Loyc.Syntax.LNode node

    A node to inspect.

    Pixie.ILog log

    A log to send error and warning messages to.

    Returns
    Type Description
    System.Boolean

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

    | Improve this Doc 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
    Loyc.Syntax.LNode node

    A node to inspect.

    Pixie.ILog log

    A log to send error and warning messages to.

    Returns
    Type Description
    System.Boolean

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

    | Improve this Doc 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
    Loyc.Syntax.LNode node

    A node to inspect.

    Pixie.ILog log

    A log to send error and warning messages to.

    Returns
    Type Description
    System.Boolean

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

    | Improve this Doc View Source

    AssertMinArgCount(LNode, Int32, 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
    Loyc.Syntax.LNode node

    A node to inspect.

    System.Int32 argCount

    The minumum number of arguments to expect.

    Pixie.ILog log

    A log to send error and warning messages to.

    Returns
    Type Description
    System.Boolean

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

    | Improve this Doc 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
    Loyc.Syntax.LNode node

    A node to inspect.

    Loyc.Syntax.LNodeKind kind

    The expected node kind for node.

    Pixie.ILog log

    A log to send error and warning messages to.

    Returns
    Type Description
    System.Boolean

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

    | Improve this Doc 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
    Pixie.ILog log

    The log to which the error is sent.

    Loyc.Syntax.LNode node

    The offending node.

    Pixie.MarkupNode message

    The error message that specifies what went wrong.

    | Improve this Doc View Source

    Print(LNode)

    Gets a pretty string representation for a node.

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

    The node to print.

    Returns
    Type Description
    System.String

    A string representation.

    | Improve this Doc View Source

    QuoteEven(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
    Pixie.MarkupNode[] nodes

    The nodes to process.

    Returns
    Type Description
    Pixie.Markup.Sequence

    A sequence container node.

    | Improve this Doc 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
    Loyc.Syntax.LNode node

    A node whose kind will be spelled out.

    Returns
    Type Description
    System.String

    A string that identifies the node's kind.

    | Improve this Doc 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
    Loyc.Syntax.LNodeKind kind

    A node kind to spell.

    Returns
    Type Description
    System.String

    A string that identifies the node kind.

    • Improve this Doc
    • View Source
    Back to top Generated by DocFX