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