_id
stringlengths
2
7
text
stringlengths
6
2.61k
title
stringclasses
1 value
c16500
// Leave is called just before the state exits the given Node.
c16501
// Parse parses the given input.
c16502
// Parse begins parsing, returning an error, if any.
c16503
// parse parses generic input, such as text markup, print or tag statement opening tokens. // parse is intended to pick up at the beginning of input, such as the start of a tag's body // or the more obvious start of a document.
c16504
// NewSafeValue wraps the given value and returns a SafeValue.
c16505
// CoerceBool coerces the given value into a boolean. Boolean false is returned // if the value cannot be coerced.
c16506
// CoerceString coerces the given value into a string. An empty string is returned // if the value cannot be coerced.
c16507
// GetAttr attempts to access the given value and return the specified attribute.
c16508
// IsArray returns true if the given Value is a slice or array.
c16509
// IsMap returns true if the given Value is a map.
c16510
// IsIterable returns true if the given Value is a slice, array, or map.
c16511
// Iterate calls the Iteratee func for every item in the Value.
c16512
// Len returns the length of Value.
c16513
// Equal returns true if the two Values are considered equal.
c16514
// Contains returns true if the haystack Value contains needle.
c16515
// String returns a string representation of a pos.
c16516
// NewModuleNode returns a ModuleNode.
c16517
// Append a Node to the BodyNode.
c16518
// NewCommentNode returns a CommentNode.
c16519
// NewPrintNode returns a PrintNode.
c16520
// NewBlockNode returns a BlockNode.
c16521
// String returns a string representation of a BlockNode.
c16522
// NewIfNode returns a IfNode.
c16523
// String returns a string representation of an IfNode.
c16524
// All returns all the child Nodes in a IfNode.
c16525
// NewExtendsNode returns a ExtendsNode.
c16526
// NewForNode returns a ForNode.
c16527
// String returns a string representation of a ForNode.
c16528
// All returns all the child Nodes in a ForNode.
c16529
// NewIncludeNode returns a IncludeNode.
c16530
// String returns a string representation of an IncludeNode.
c16531
// NewEmbedNode returns a EmbedNode.
c16532
// String returns a string representation of an EmbedNode.
c16533
// All returns all the child Nodes in a EmbedNode.
c16534
// NewUseNode returns a UseNode.
c16535
// String returns a string representation of a UseNode.
c16536
// NewSetNode returns a SetNode.
c16537
// String returns a string representation of an SetNode.
c16538
// NewDoNode returns a DoNode.
c16539
// NewFilterNode creates a FilterNode.
c16540
// String returns a string representation of a FilterNode.
c16541
// NewMacroNode returns a MacroNode.
c16542
// String returns a string representation of a MacroNode.
c16543
// NewImportNode returns a ImportNode.
c16544
// String returns a string representation of a ImportNode.
c16545
// NewFromNode returns a FromNode.
c16546
// String returns a string representation of a FromNode.
c16547
// All returns all the child Nodes in a FuncExpr.
c16548
// NewFuncExpr returns a FuncExpr.
c16549
// String returns a string representation of a FuncExpr.
c16550
// String returns a string representation of the FilterExpr.
c16551
// NewFilterExpr returns a FilterExpr.
c16552
// String returns a string representation of the TestExpr.
c16553
// NewBinaryExpr returns a BinaryExpr.
c16554
// String returns a string representation of the BinaryExpr.
c16555
// NewUnaryExpr returns a new UnaryExpr.
c16556
// String returns a string representation of a UnaryExpr.
c16557
// NewGetAttrExpr returns a GetAttrExpr.
c16558
// All returns all the child Nodes in a GetAttrExpr.
c16559
// String returns a string representation of a GetAttrExpr.
c16560
// NewTernaryIfExpr returns a TernaryIfExpr.
c16561
// All returns all the child Nodes in a TernaryIfExpr.
c16562
// String returns a string representation of a TernaryIfExpr.
c16563
// NewKeyValueExpr returns a KeyValueExpr.
c16564
// String returns a string representation of a KeyValueExpr.
c16565
// All returns all the child Nodes in a ArrayExpr.
c16566
// New creates an empty Env. // If nil is passed as loader, a StringLoader is used.
c16567
// Execute parses and executes the given template.
c16568
// Parse loads and parses the given template.
c16569
// Load on a StringLoader simply returns the name that is passed in.
c16570
// Load tries to load the template from the in-memory map.
c16571
// Load on a FileSystemLoader attempts to load the given file, relative to the // configured root directory.
c16572
// newUnexpectedTokenError returns a new UnexpectedTokenError
c16573
// newUnclosedTagError returns a new UnclosedTagError.
c16574
// newUnexpectedValueError returns a new UnexpectedPunctuationError
c16575
// builtInFilters returns a map containing all built-in Twig filters, // with the exception of "escape", which is provided by the AutoEscapeExtension.
c16576
// filterAbs takes no arguments and returns the absolute value of val. // Value val will be coerced into a number.
c16577
// filterCapitalize takes no arguments and returns val with the first // character capitalized.
c16578
// filterDefault takes one argument, the default value. If val is empty, // the default value will be returned.
c16579
// filterLength returns the length of val.
c16580
// filterLower returns val transformed to lower-case.
c16581
// filterTitle returns val with the first character of each word capitalized.
c16582
// filterTrim returns val with whitespace trimmed on both left and ride sides.
c16583
// filterUpper returns val in upper-case.
c16584
// nextToken returns the next token emitted by the lexer.
c16585
// tokenize kicks things off.
c16586
// newLexer creates a lexer, ready to begin tokenizing.
c16587
// emit will create a token with a value starting from the last emission // until the current cursor position.
c16588
// tryLexOperator attempts to match the next sequence of characters to a list of operators. // This is implemented this way because Twig supports many alphabetical operators like "in", // which require more than just a check of the next character.
c16589
// parseExpr parses an expression.
c16590
// parseFunc parses a function call expression from the first argument expression until the closing parenthesis.
c16591
// New creates a new, default Env that aims to be compatible with Twig. // If nil is passed as loader, a StringLoader is used.
c16592
// sysGet is called by getxattr and lgetxattr with the appropriate syscall // number. This works because syscalls have the same signature and return // values.
c16593
// sysSet is called by removexattr and lremovexattr with the appropriate syscall // number. This works because syscalls have the same signature and return // values.
c16594
// Get retrieves extended attribute data associated with path. It will follow // all symlinks along the path.
c16595
// LGet is like Get but does not follow a symlink at the end of the path.
c16596
// FGet is like Get but accepts a os.File instead of a file path.
c16597
// get contains the buffer allocation logic used by both Get and LGet.
c16598
// Set associates name and data together as an attribute of path.
c16599
// LSet is like Set but does not follow a symlink at // the end of the path.