generate
本頁內容尚未翻譯。
cfamily.PrintedLine
Section titled “cfamily.PrintedLine”record PrintedLineA printed line: its text and the nodes printed on it.
cfamily.PrintedLine.of
Section titled “cfamily.PrintedLine.of”def PrintedLine.of (text : String) (nodes : List NodeId) : PrintedLineA line with its nodes.
cfamily.PrintedLine.plain
Section titled “cfamily.PrintedLine.plain”def PrintedLine.plain (text : String) : PrintedLineA line with no nodes.
cfamily.Names
Section titled “cfamily.Names”def Names : TypeDeclaration nodes to source names.
cfamily.Names.of
Section titled “cfamily.Names.of”def Names.of (ns : Names) (x : DeclId) : StringThe source name of a declaration (its node when it has none).
cfamily.Print.indent
Section titled “cfamily.Print.indent”def Print.indent (k : Nat) : Stringk levels of indentation, two spaces each.
cfamily.Print.namedEscape
Section titled “cfamily.Print.namedEscape”def Print.namedEscape (c : Nat) : Option StringThe escape a control character has a name for (C11 6.4.4.4: a, b, t, n, v, f and r after a backslash), if it has one.
cfamily.Print.octalEscape
Section titled “cfamily.Print.octalEscape”def Print.octalEscape (c : Nat) : StringA code as a three-digit octal escape (three digits, so a digit after it is not read as part of it).
cfamily.Print.escapeCode
Section titled “cfamily.Print.escapeCode”def Print.escapeCode (c : Nat) (quote : Nat) : StringA character escaped for a quote: a control character by its name or in octal, backslash and the quote itself.
cfamily.Print.escapeString
Section titled “cfamily.Print.escapeString”def Print.escapeString (s : String) : StringA string’s contents as in a C string literal.
cfamily.Print.escapeCharacter
Section titled “cfamily.Print.escapeCharacter”def Print.escapeCharacter (c : Nat) : StringA character constant’s contents (‘\0’ for the null).
cfamily.Print.commas
Section titled “cfamily.Print.commas”def Print.commas (xs : List String) : StringTexts separated by commas.
cfamily.Print.isEmpty
Section titled “cfamily.Print.isEmpty”def Print.isEmpty (s : String) : BoolWhether a string is empty.
cfamily.Print.hexDigits
Section titled “cfamily.Print.hexDigits”def Print.hexDigits (fuel : Nat) (v : Nat) (acc : List Char) : List CharThe hexadecimal digits of a number put before acc (fuel bounds the digits).
cfamily.Print.hexLiteral
Section titled “cfamily.Print.hexLiteral”def Print.hexLiteral (v : Int) : StringAn integer constant written in hexadecimal (an octal one has the same type, C11 6.4.4.1p5).
cfamily.UnaryOp.symbol
Section titled “cfamily.UnaryOp.symbol”def UnaryOp.symbol (op : UnaryOp) : StringA unary operator as written.
cfamily.Manipulator.name
Section titled “cfamily.Manipulator.name”def Manipulator.name (m : Manipulator) : StringA stream manipulator’s name after std::.
cfamily.Param.text
Section titled “cfamily.Param.text”def Param.text (p : Param) : StringA parameter as declared in a definition: int a[3].
cfamily.Param.list
Section titled “cfamily.Param.list”def Param.list (texts : List String) : StringA parameter list: void for none.
cfamily.Param.names
Section titled “cfamily.Param.names”def Param.names (ps : List Param) : NamesThe parameters’ names.
cfamily.Capture.text
Section titled “cfamily.Capture.text”def Capture.text (c : Capture) : StringA lambda’s capture as written.
cfamily.Expr.lambdaText
Section titled “cfamily.Expr.lambdaText”def Expr.lambdaText (cs : List Capture) (ps : List Param) (r : Option TypeSyntax) (m : Bool) (lines : List PrintedLine) : StringA lambda on one line: its captures, parameters, mutable, result type, and its body’s lines (printed) joined.
cfamily.Print.lambdaKey
Section titled “cfamily.Print.lambdaKey”def Print.lambdaKey (n : NodeId) : StringThe key a lambda’s text is kept under in the names (its sLambda declares it for the statements after it).
cfamily.Expr.printTop
Section titled “cfamily.Expr.printTop”def Expr.printTop (ns : Names) (e : Expr) : StringAn expression at the top (a statement or a for step): no outer parentheses.
cfamily.Expr.nodesOption
Section titled “cfamily.Expr.nodesOption”def Expr.nodesOption (m : Option Expr) : List NodeIdThe nodes of an optional expression.
cfamily.Init.nodesOption
Section titled “cfamily.Init.nodesOption”def Init.nodesOption (m : Option Init) : List NodeIdThe nodes of an optional initializer.
cfamily.Print.declaration
Section titled “cfamily.Print.declaration”def Print.declaration (ns : Names) (name : String) (t : TypeSyntax) (i : Option Init) : StringA declaration without its semicolon: int a[3] = {1, 2, 3}.
cfamily.Print.closing
Section titled “cfamily.Print.closing”def Print.closing (k : Nat) : PrintedLineA closing brace at k levels.
cfamily.PrintedLine.at
Section titled “cfamily.PrintedLine.at”def PrintedLine.at (k : Nat) (text : String) (nodes : List NodeId) : PrintedLineA line at k levels of indentation.
cfamily.Print.braced
Section titled “cfamily.Print.braced”def Print.braced (k : Nat) (head : PrintedLine) (inside : List PrintedLine) : List PrintedLineA head line, the lines inside, and the closing brace at k levels.
cfamily.Field.declarator
Section titled “cfamily.Field.declarator”def Field.declarator (y : String) (t : TypeSyntax) : StringA member as declared: its type around the name, and a bit-field’s width after it.
cfamily.StructDefinition.lines
Section titled “cfamily.StructDefinition.lines”def StructDefinition.lines (k : Nat) (keyword : String) (d : StructDefinition) : List PrintedLineA struct’s or union’s definition at k levels of indentation.
cfamily.Print.unnamedDefinitions
Section titled “cfamily.Print.unnamedDefinitions”def Print.unnamedDefinitions (items : List Item) : List (String * String)The structs and unions whose names a front end made up (Tag.isUnnamed), each by its name with its definition
written on one line (union { int i; double d; }): C cannot name them, so the definition is written where the type is
used. A definition is written with the ones before it among items.
cfamily.Print.addUnnamed
Section titled “cfamily.Print.addUnnamed”def Print.addUnnamed (known : List (String * String)) (it : Item) : List (String * String)The made-up definitions known so far with the item it’s added, if it is one.
cfamily.Print.unnamedDefinition
Section titled “cfamily.Print.unnamedDefinition”def Print.unnamedDefinition (known : List (String * String)) (keyword : String) (d : StructDefinition) : List (String * String)The made-up definitions known so far with the struct’s or union’s d added (written after keyword), if its name
is made up.
cfamily.TypeSyntax.unnamedPrinted
Section titled “cfamily.TypeSyntax.unnamedPrinted”def TypeSyntax.unnamedPrinted (known : List (String * String)) (t : TypeSyntax) : TypeSyntaxA struct or union type t whose name is made up and whose definition is in known written as that definition (a
tName, printed as written).
cfamily.StructDefinition.isUnnamed
Section titled “cfamily.StructDefinition.isUnnamed”def StructDefinition.isUnnamed (d : StructDefinition) : BoolWhether the name of the struct or union d is made up (it is written where it is used, Print.unnamedDefinitions).
cfamily.Enumerator.names
Section titled “cfamily.Enumerator.names”def Enumerator.names (cs : List Enumerator) : NamesThe enumerators’ names.
cfamily.Enumerator.qualifiedNames
Section titled “cfamily.Enumerator.qualifiedNames”def Enumerator.qualifiedNames (x : String) (cs : List Enumerator) : NamesThe names of the enumerators cs outside the scoped enumeration x (C++’s enum class): x::name ([dcl.enum]p11).
cfamily.Enumerator.scopedHead
Section titled “cfamily.Enumerator.scopedHead”def Enumerator.scopedHead (x : String) (base : Option TypeSyntax) : StringA scoped enumeration’s head: enum class x, with : base where it has one.
cfamily.Enumerator.scopedLine
Section titled “cfamily.Enumerator.scopedLine”def Enumerator.scopedLine (ns : Names) (n : NodeId) (x : String) (base : Option TypeSyntax) (cs : List Enumerator) : PrintedLineThe line of the scoped enumeration x with the base and the enumerators cs at the node n, with the names ns
around it: its values see its enumerators unqualified (what comes after it names them qualified, Item.names).
cfamily.Enumerator.textOf
Section titled “cfamily.Enumerator.textOf”def Enumerator.textOf (ns : Names) (c : Enumerator) : StringAn enumerator: a, or b = 2.
cfamily.Enumerator.text
Section titled “cfamily.Enumerator.text”def Enumerator.text (ns : Names) (cs : List Enumerator) : StringThe enumerators separated by commas.
cfamily.Enumerator.nodes
Section titled “cfamily.Enumerator.nodes”def Enumerator.nodes (cs : List Enumerator) : List NodeIdThe nodes of the enumerators’ values.
cfamily.TypeDefinition.lines
Section titled “cfamily.TypeDefinition.lines”def TypeDefinition.lines (ns : Names) (k : Nat) (d : TypeDefinition) : List PrintedLineA type defined in a block, at k levels of indentation (an enum’s values with its enumerators in scope).
cfamily.Binder.printAll
Section titled “cfamily.Binder.printAll”def Binder.printAll (xs : List Binder) : StringA structured binding’s names as written: [a, b].
cfamily.Binder.names
Section titled “cfamily.Binder.names”def Binder.names (xs : List Binder) : NamesA structured binding’s names, each its label and name.
cfamily.Stmt.namesAfter
Section titled “cfamily.Stmt.namesAfter”def Stmt.namesAfter (ns : Names) (s : Stmt) : NamesThe names a statement brings into scope for the statements after it.
cfamily.Stmt.namesAfterAll
Section titled “cfamily.Stmt.namesAfterAll”def Stmt.namesAfterAll (ns : Names) (ss : List Stmt) : NamesThe names after statements in order.
cfamily.Stmt.namesAfterOption
Section titled “cfamily.Stmt.namesAfterOption”def Stmt.namesAfterOption (ns : Names) (m : Option Stmt) : NamesThe names after an optional statement (a for’s init).
cfamily.Stmt.forInit
Section titled “cfamily.Stmt.forInit”def Stmt.forInit (ns : Names) (m : Option Stmt) : StringA for’s init on its line: a declaration or an expression, without the semicolon.
cfamily.Stmt.forInitNodes
Section titled “cfamily.Stmt.forInitNodes”def Stmt.forInitNodes (m : Option Stmt) : List NodeIdThe nodes of a for’s init.
cfamily.Expr.printOption
Section titled “cfamily.Expr.printOption”def Expr.printOption (ns : Names) (m : Option Expr) : StringAn optional expression’s text, empty when absent.
cfamily.Stmt.printSimple
Section titled “cfamily.Stmt.printSimple”def Stmt.printSimple (ns : Names) (k : Nat) (s : Stmt) : List PrintedLineA statement with no statements inside it, on one line (the lowering’s copies print nothing).
cfamily.Print.member
Section titled “cfamily.Print.member”def Print.member (ns : Names) (x : String) : StringA member of the object a member function runs on, named as it is written: alone, or after this-> where a local
or a parameter of the same name hides it.
cfamily.Stmt.braceNodes
Section titled “cfamily.Stmt.braceNodes”def Stmt.braceNodes (s : Stmt) : List NodeIdThe node of a block whose braces a construct prints as its own (recorded on the construct’s line).
cfamily.Param.declared
Section titled “cfamily.Param.declared”def Param.declared (ns : Names) (p : Param) : StringA parameter as declared in a prototype or a class: with its default value (the names in scope, the globals’).
cfamily.FunctionDefinition.isConversion
Section titled “cfamily.FunctionDefinition.isConversion”def FunctionDefinition.isConversion (name : String) : BoolA conversion function (operator T) has no result type written.
cfamily.FunctionDefinition.conversionName
Section titled “cfamily.FunctionDefinition.conversionName”def FunctionDefinition.conversionName (name : String) (r : Option TypeSyntax) : StringA conversion function’s name as declared: its class’s part, then operator and the type as written (a pointer to
member (spelled with ::*) by its typedef, operator Helper: the type’s own spelling is not a declarator there, [class.conv.fct]p1).
cfamily.FunctionDefinition.head
Section titled “cfamily.FunctionDefinition.head”def FunctionDefinition.head (ns : Names) (withDefaults : Bool) (f : FunctionDefinition) : StringA function’s head: the result type, name and parameters, with the defaults or without.
cfamily.Print.noexcept
Section titled “cfamily.Print.noexcept”def Print.noexcept (nx : Bool) : String“ noexcept” when a constructor or function is.
cfamily.FunctionDefinition.noexcept
Section titled “cfamily.FunctionDefinition.noexcept”def FunctionDefinition.noexcept (f : FunctionDefinition) : String“ noexcept” when the function is.
cfamily.FunctionDefinition.renamed
Section titled “cfamily.FunctionDefinition.renamed”def FunctionDefinition.renamed (x : String) (f : FunctionDefinition) : FunctionDefinitionThe function with another name.
cfamily.Print.prototypes
Section titled “cfamily.Print.prototypes”def Print.prototypes (ns : Names) (early : List String) (fs : List FunctionDefinition) : List PrintedLinePrototypes of the functions other than main, so they may call each other in any order; a function in early has had its defaults written already and is declared without them (a default is given once, C++ [dcl.fct.default]p4).
cfamily.Print.functionWith
Section titled “cfamily.Print.functionWith”def Print.functionWith (ns : Names) (withDefaults : Bool) (f : FunctionDefinition) : List PrintedLineA function’s definition: its head and its body, with the parameters in scope; the default arguments written when it is the only declaration (a function template has no prototype before it, so without them its defaults were lost).
cfamily.Print.function
Section titled “cfamily.Print.function”def Print.function (ns : Names) (f : FunctionDefinition) : List PrintedLineA function’s definition after its prototype (which has the default arguments).
cfamily.Print.isIdentifierCode
Section titled “cfamily.Print.isIdentifierCode”def Print.isIdentifierCode (c : Nat) : BoolWhether a character can be part of an identifier.
cfamily.Print.wordAt
Section titled “cfamily.Print.wordAt”def Print.wordAt (w : List Nat) (cs : List Nat) : BoolWhether a word starts the characters and ends there as an identifier.
cfamily.Print.hasWordIn
Section titled “cfamily.Print.hasWordIn”def Print.hasWordIn (ws : List (List Nat)) (cs : List Nat) (afterIdentifier : Bool) : BoolWhether one of the words occurs as a whole identifier in the characters.
cfamily.Print.hasWord
Section titled “cfamily.Print.hasWord”def Print.hasWord (ws : List String) (text : String) : BoolWhether one of the words occurs as a whole identifier in a text.
cfamily.Print.named
Section titled “cfamily.Print.named”def Print.named (fs : List FunctionDefinition) (text : String) : List FunctionDefinitionThe functions whose names occur in a text.
cfamily.Member.defaults
Section titled “cfamily.Member.defaults”def Member.defaults (ms : List Member) : List ExprThe expressions in a class that may call functions: members’ defaults and parameters’ defaults.
cfamily.ClassDefinition.defaultsText
Section titled “cfamily.ClassDefinition.defaultsText”def ClassDefinition.defaultsText (d : ClassDefinition) : StringA class’s defaults as text, to find the functions they call.
cfamily.Item.early
Section titled “cfamily.Item.early”def Item.early (fs : List FunctionDefinition) (items : List Item) : List StringThe functions whose prototypes are printed early with their defaults: those a global’s initializer or a class’s defaults call (C++ dynamic initialization).
cfamily.TemplateParam.name
Section titled “cfamily.TemplateParam.name”def TemplateParam.name (p : TemplateParam) : StringA template parameter’s name.
cfamily.TemplateParam.text
Section titled “cfamily.TemplateParam.text”def TemplateParam.text (withDefaults : Bool) (ps : List TemplateParam) : StringTemplate parameters: typename T = int, int N; the defaults only in the first declaration.
cfamily.TemplateParam.header
Section titled “cfamily.TemplateParam.header”def TemplateParam.header (withDefaults : Bool) (n : NodeId) (ps : List TemplateParam) : PrintedLineThe template header: template
cfamily.Access.word
Section titled “cfamily.Access.word”def Access.word (a : Access) : StringAn access as written.
cfamily.Access.same
Section titled “cfamily.Access.same”def Access.same (a : Access) (b : Access) : BoolWhether two accesses are the same.
cfamily.Access.label
Section titled “cfamily.Access.label”def Access.label (current : Access) (next : Access) : List PrintedLineAn access label when the access changes.
cfamily.Base.textOf
Section titled “cfamily.Base.textOf”def Base.textOf (b : Base) : StringA base: virtual public A.
cfamily.Base.text
Section titled “cfamily.Base.text”def Base.text (bs : List Base) : StringThe bases: “ : public A, virtual private B”.
cfamily.Virtuality.before
Section titled “cfamily.Virtuality.before”def Virtuality.before (v : Virtuality) : Stringvirtual before a method’s declaration.
cfamily.Virtuality.after
Section titled “cfamily.Virtuality.after”def Virtuality.after (v : Virtuality) : Stringoverride or = 0 after a method’s declaration.
cfamily.Member.enumeratorNames
Section titled “cfamily.Member.enumeratorNames”def Member.enumeratorNames (ms : List Member) : NamesThe enumerators the members define, those of nested classes too.
cfamily.Member.qualifiedEnumeratorNames
Section titled “cfamily.Member.qualifiedEnumeratorNames”def Member.qualifiedEnumeratorNames (x : String) (ms : List Member) : NamesThe enumerators a class’s members define (those of nested classes too), qualified by the class (C::E, which names
the enumerator anywhere: outside the class the bare name is not in scope).
cfamily.Member.staticNames
Section titled “cfamily.Member.staticNames”def Member.staticNames (x : String) (ms : List Member) : NamesThe names of a class’s static data members, qualified by the class (C::n, which names the member anywhere).
cfamily.Member.constructorLine
Section titled “cfamily.Member.constructorLine”def Member.constructorLine (ns : Names) (x : String) (header : String) (ex : Bool) (ctorNoexc : Bool) (ps : List Param) : PrintedLineA constructor’s declaration in its class x (with the names ns): its template header (empty for none), explicit or not (ex), its parameters ps, noexcept or not (ctorNoexc).
cfamily.Member.lines
Section titled “cfamily.Member.lines”def Member.lines (ns : Names) (x : String) (current : Access) (ms : List Member) : List PrintedLineThe members declared in a class (access labels only where the access changes); x is the class’s name.
cfamily.ClassDefinition.lines
Section titled “cfamily.ClassDefinition.lines”def ClassDefinition.lines (ns : Names) (d : ClassDefinition) : List PrintedLineA class’s definition with its members’ declarations; the members’ definitions are printed after it.
cfamily.ClassDefinition.instance
Section titled “cfamily.ClassDefinition.instance”def ClassDefinition.instance (args : List TypeSyntax) (d : ClassDefinition) : ClassDefinitionThe class named as an instance: class C
cfamily.MemberInit.textOf
Section titled “cfamily.MemberInit.textOf”def MemberInit.textOf (ns : Names) (y : MemberInit) : StringA constructor’s initializer: a(x), or a{x} with a braced list.
cfamily.MemberInit.text
Section titled “cfamily.MemberInit.text”def MemberInit.text (ns : Names) (xs : List MemberInit) : StringA constructor’s initializers: “ : a(x), b(y)“.
cfamily.MemberInit.nodes
Section titled “cfamily.MemberInit.nodes”def MemberInit.nodes (xs : List MemberInit) : List NodeIdThe nodes of a constructor’s initializers.
cfamily.Member.constructorDefinition
Section titled “cfamily.Member.constructorDefinition”def Member.constructorDefinition (ns : Names) (q : String) (x : String) (k : NodeId) (ctorNoexc : Bool) (ps : List Param) (inits : List MemberInit) (body : Stmt) : List PrintedLineA constructor’s definition outside its class (q the qualified class name, x its own; with the names ns): its node k, noexcept or not (ctorNoexc), parameters ps, initializers inits and body (a function try block’s try goes before the initializers).
cfamily.Member.typesOf
Section titled “cfamily.Member.typesOf”def Member.typesOf (dependent : Bool) (q : String) (ms : List Member) : List (String * String)The types a class defines (nested classes, unions, enumerations, member typedefs), each by its name and its name
qualified by the class (typename C<T>::y in a template, where the class is dependent).
cfamily.FunctionDefinition.outsideOf
Section titled “cfamily.FunctionDefinition.outsideOf”def FunctionDefinition.outsideOf (scope : List (String * String)) (f : FunctionDefinition) : FunctionDefinitionA member function with its result type written outside the class (a conversion function’s result is part of its name, after the class’s qualifier, so in the class’s scope already).
cfamily.Item.methods
Section titled “cfamily.Item.methods”def Item.methods (ns : Names) (items : List Item) : List PrintedLineThe member definitions of the items’ classes, in order (a full specialization’s members are ordinary members).
cfamily.Item.templates
Section titled “cfamily.Item.templates”def Item.templates (ns : Names) (items : List Item) : List PrintedLineThe function templates and their specializations, after the prototypes.
cfamily.Item.names
Section titled “cfamily.Item.names”def Item.names (items : List Item) : NamesThe names the items declare: globals, enumerators (a class’s too), and those inside namespaces.
cfamily.Item.classes
Section titled “cfamily.Item.classes”def Item.classes (items : List Item) : List (String * Bool)The classes the items define, with whether each is declared with class.
cfamily.Print.forwards
Section titled “cfamily.Print.forwards”def Print.forwards (later : List (String * Bool)) (lines : List PrintedLine) : List PrintedLineForward declarations of the later classes the lines name: a type has to be declared before it is written.
cfamily.Item.withoutStatic
Section titled “cfamily.Item.withoutStatic”def Item.withoutStatic (it : Item) : ItemAn item without its file-scope static.
cfamily.Expr.calls
Section titled “cfamily.Expr.calls”def Expr.calls (fs : List String) (e : Expr) : BoolWhether an expression calls one of the functions by name.
cfamily.Item.calls
Section titled “cfamily.Item.calls”def Item.calls (fs : List String) (items : List Item) : BoolWhether the items call one of the functions anywhere: functions, templates, classes, globals’ initializers and namespaces.
cfamily.PrintedLine.hasWord
Section titled “cfamily.PrintedLine.hasWord”def PrintedLine.hasWord (ws : List String) (ls : List PrintedLine) : BoolWhether a line has one of the words as an identifier.
cfamily.PrintedLine.contains
Section titled “cfamily.PrintedLine.contains”def PrintedLine.contains (texts : List String) (ls : List PrintedLine) : BoolWhether a line contains one of the texts (std::max( and the like).
cfamily.Print.header
Section titled “cfamily.Print.header”def Print.header (needed : Bool) (h : String) : List PrintedLineA header when it is needed.
cfamily.Print.mathNames
Section titled “cfamily.Print.mathNames”def Print.mathNames : List StringThe <math.h> functions the model has (<cmath>’s under std::).
cfamily.Print.mathCalls
Section titled “cfamily.Print.mathCalls”def Print.mathCalls : List StringHow a call of a <cmath> function starts in the printed C++ (std::sqrt(, and C++’s own std::abs().
cfamily.Print.headers
Section titled “cfamily.Print.headers”def Print.headers (lang : Language) (items : List Item) (body : List PrintedLine) : List PrintedLineThe headers chosen by what the program uses: stdio always; for C, stdbool when it writes bool; for C++, the streams, strings, containers and exceptions it names; and the C library headers of the functions it calls.
cfamily.Item.includes
Section titled “cfamily.Item.includes”def Item.includes (items : List Item) : List PrintedLineThe program’s own includes, in order.
cfamily.Item.allNames
Section titled “cfamily.Item.allNames”def Item.allNames (items : List Item) : NamesThe names of every declaration in the items’ functions (their parameters and locals) and at file scope: what an array’s length written as an expression is printed with.
cfamily.TypeSyntax.lengthPrinted
Section titled “cfamily.TypeSyntax.lengthPrinted”def TypeSyntax.lengthPrinted (ns : Names) (t : TypeSyntax) : TypeSyntaxA written type with each array length written as an expression printed as it is written (tArrP, whose length is
printed as its text).
cfamily.Program.generatedLines
Section titled “cfamily.Program.generatedLines”def Program.generatedLines (p : Program) : List PrintedLineThe printed lines with the nodes on each: the headers (the program’s own when it writes any), then the body.
cfamily.Program.generate
Section titled “cfamily.Program.generate”def Program.generate (p : Program) : StringA program as C or C++ source, one statement per line.
cfamily.PrintedLine.find
Section titled “cfamily.PrintedLine.find”def PrintedLine.find (ls : List PrintedLine) (k : Nat) (n : NodeId) : NatThe line (counting from k) a node is printed on, or 0 when it is not printed.
cfamily.NodeId.origin
Section titled “cfamily.NodeId.origin”def NodeId.origin (n : NodeId) : Option NodeIdA node without its last :part, if it has one: a node the checker makes for part of a construct (n:element of a
range-based for, n:list of a braced list) is the construct’s node and a suffix.
cfamily.PrintedLine.findOrigin
Section titled “cfamily.PrintedLine.findOrigin”def PrintedLine.findOrigin (ls : List PrintedLine) (fuel : Nat) (n : NodeId) : NatThe line a node or the construct it was made for is printed on, trying the node without its suffixes in turn.
cfamily.Program.generatedLineOf
Section titled “cfamily.Program.generatedLineOf”def Program.generatedLineOf (p : Program) (n : NodeId) : NatThe line (counting from 1) a node is printed on, or 0 when it is not printed; a node made for part of a construct is found by the construct’s node.