_id
stringlengths
2
7
title
stringclasses
1 value
partition
stringclasses
3 values
text
stringlengths
6
2.61k
language
stringclasses
1 value
meta_information
dict
c6600
train
// CompareDepth compares two Skylark values. // The comparison operation must be one of EQL, NEQ, LT, LE, GT, or GE. // CompareDepth returns an error if an ordered comparison was // requested for a pair of values that do not support it. // // The depth parameter limits the maximum depth of recursion // in cyclic data s...
{ "resource": "" }
c6601
train
// dump is provided as an aid to debugging.
{ "resource": "" }
c6602
train
// hashString computes the hash of s.
{ "resource": "" }
c6603
train
// softHashString computes the FNV hash of s in software.
{ "resource": "" }
c6604
train
// ParseExpr parses a Skylark expression. // See Parse for explanation of parameters.
{ "resource": "" }
c6605
train
// nextToken advances the scanner and returns the position of the // previous token.
{ "resource": "" }
c6606
train
// parseLambda parses a lambda expression. // The allowCond flag allows the body to be an 'a if b else c' conditional.
{ "resource": "" }
c6607
train
// primary_with_suffix = primary // | primary '.' IDENT // | primary slice_suffix // | primary call_suffix
{ "resource": "" }
c6608
train
// Comment assignment. // We build two lists of all subnodes, preorder and postorder. // The preorder list is ordered by start location, with outer nodes first. // The postorder list is ordered by end location, with outer nodes last. // We use the preorder list to assign each whole-line comment to the syntax // immedia...
{ "resource": "" }
c6609
train
// isCasedString reports whether its argument contains any cased characters.
{ "resource": "" }
c6610
train
// MakeInt64 returns a Skylark int for the specified int64.
{ "resource": "" }
c6611
train
// MakeUint64 returns a Skylark int for the specified uint64.
{ "resource": "" }
c6612
train
// Int64 returns the value as an int64. // If it is not exactly representable the result is undefined and ok is false.
{ "resource": "" }
c6613
train
// Uint64 returns the value as a uint64. // If it is not exactly representable the result is undefined and ok is false.
{ "resource": "" }
c6614
train
// Float returns the float value nearest i.
{ "resource": "" }
c6615
train
// AsInt32 returns the value of x if is representable as an int32.
{ "resource": "" }
c6616
train
// NumberToInt converts a number x to an integer value. // An int is returned unchanged, a float is truncated towards zero. // NumberToInt reports an error for all other values.
{ "resource": "" }
c6617
train
// finiteFloatToInt converts f to an Int, truncating towards zero. // f must be finite.
{ "resource": "" }
c6618
train
// non-standard dialect flags
{ "resource": "" }
c6619
train
// SetLocal sets the thread-local value associated with the specified key. // It must not be called after execution begins.
{ "resource": "" }
c6620
train
// The Frames of a thread are structured as a spaghetti stack, not a // slice, so that an EvalError can copy a stack efficiently and immutably. // In hindsight using a slice would have led to a more convenient API.
{ "resource": "" }
c6621
train
// Position returns the source position of the current point of execution in this frame.
{ "resource": "" }
c6622
train
// Backtrace returns a user-friendly error message describing the stack // of calls that led to this error.
{ "resource": "" }
c6623
train
// WriteBacktrace writes a user-friendly description of the stack to buf.
{ "resource": "" }
c6624
train
// Stack returns the stack of frames, innermost first.
{ "resource": "" }
c6625
train
// SourceProgram produces a new program by parsing, resolving, // and compiling a Skylark source file. // On success, it returns the parsed file and the compiled program. // The filename and src parameters are as for syntax.Parse. // // The isPredeclared predicate reports whether a name is // a pre-declared identifier ...
{ "resource": "" }
c6626
train
// CompiledProgram produces a new program from the representation // of a compiled program previously saved by Program.Write.
{ "resource": "" }
c6627
train
// Init creates a set of global variables for the program, // executes the toplevel code of the specified program, // and returns a new, unfrozen dictionary of the globals.
{ "resource": "" }
c6628
train
// The following functions are primitive operations of the byte code interpreter. // list += iterable
{ "resource": "" }
c6629
train
// getAttr implements x.dot.
{ "resource": "" }
c6630
train
// setField implements x.name = y.
{ "resource": "" }
c6631
train
// Call calls the function fn with the specified positional and keyword arguments.
{ "resource": "" }
c6632
train
// Expr resolves the specified expression. // It returns the local variables bound within the expression. // // The isPredeclared and isUniversal predicates behave as for the File function.
{ "resource": "" }
c6633
train
// bind creates a binding for id in the current block, // if there is not one already, and reports an error if // a global was re-bound and allowRebind is false. // It returns whether a binding already existed.
{ "resource": "" }
c6634
train
// lookupLocal looks up an identifier within its immediately enclosing function.
{ "resource": "" }
c6635
train
// lookupLexical looks up an identifier within its lexically enclosing environment.
{ "resource": "" }
c6636
train
// FromStringDict returns a whose elements are those of d. // The constructor parameter specifies the constructor; use Default for an ordinary struct.
{ "resource": "" }
c6637
train
// Attr returns the value of the specified field, // or deprecated method if the name is "to_json" or "to_proto" // and the struct has no field of that name.
{ "resource": "" }
c6638
train
// Read parses a chunked file and returns its chunks. // It reports failures using the reporter.
{ "resource": "" }
c6639
train
// GotError should be called by the client to report an error at a particular line. // GotError reports unexpected errors to the chunk's reporter.
{ "resource": "" }
c6640
train
// Done should be called by the client to indicate that the chunk has no more errors. // Done reports expected errors that did not occur to the chunk's reporter.
{ "resource": "" }
c6641
train
// add returns the position at the end of s, assuming it starts at p.
{ "resource": "" }
c6642
train
// peekRune returns the next rune in the input without consuming it. // Newlines in Unix, DOS, or Mac format are treated as one rune, '\n'.
{ "resource": "" }
c6643
train
// readRune consumes and returns the next rune in the input. // Newlines in Unix, DOS, or Mac format are treated as one rune, '\n'.
{ "resource": "" }
c6644
train
// startToken marks the beginning of the next input token. // It must be followed by a call to endToken once the token has // been consumed using readRune.
{ "resource": "" }
c6645
train
// endToken marks the end of an input token. // It records the actual token string in val.raw if the caller // has not done that already.
{ "resource": "" }
c6646
train
// PrintError prints the error to stderr, // or its backtrace if it is a Skylark evaluation error.
{ "resource": "" }
c6647
train
// MakeLoad returns a simple sequential implementation of module loading // suitable for use in the REPL. // Each function returned by MakeLoad accesses a distinct private cache.
{ "resource": "" }
c6648
train
// Write writes a compiled Skylark program to out.
{ "resource": "" }
c6649
train
// ReadProgram reads a compiled Skylark program from in.
{ "resource": "" }
c6650
train
// idents convert syntactic identifiers to compiled form.
{ "resource": "" }
c6651
train
// Expr compiles an expression to a program consisting of a single toplevel function.
{ "resource": "" }
c6652
train
// File compiles the statements of a file into a program.
{ "resource": "" }
c6653
train
// generate emits the linear instruction stream from the CFG, // and builds the PC-to-line number table.
{ "resource": "" }
c6654
train
// PrintOp prints an instruction. // It is provided for debugging.
{ "resource": "" }
c6655
train
// emit emits an instruction to the current block.
{ "resource": "" }
c6656
train
// emit1 emits an instruction with an immediate operand.
{ "resource": "" }
c6657
train
// jump emits a jump to the specified block. // On return, the current block is unset.
{ "resource": "" }
c6658
train
// nameIndex returns the index of the specified name // within the name pool, adding it if necessary.
{ "resource": "" }
c6659
train
// constantIndex returns the index of the specified constant // within the constant pool, adding it if necessary.
{ "resource": "" }
c6660
train
// functionIndex returns the index of the specified function // AST the nestedfun pool, adding it if necessary.
{ "resource": "" }
c6661
train
// string emits code to push the specified string.
{ "resource": "" }
c6662
train
// set emits code to store the top-of-stack value // to the specified local or global variable.
{ "resource": "" }
c6663
train
// lookup emits code to push the value of the specified variable.
{ "resource": "" }
c6664
train
// assign implements lhs = rhs for arbitrary expressions lhs. // RHS is on top of stack, consumed.
{ "resource": "" }
c6665
train
// add returns an expression denoting the sum of args, // which are all addable values of the type indicated by code. // The resulting syntax is degenerate, lacking position, etc.
{ "resource": "" }
c6666
train
// ifelse emits a Boolean control flow decision. // On return, the current block is unset.
{ "resource": "" }
c6667
train
// Returns a nice formatted error string.
{ "resource": "" }
c6668
train
// RawLine returns the affected line from the original template, if available.
{ "resource": "" }
c6669
train
// Creates a new parser to parse tokens. // Used inside pongo2 to parse documents and to provide an easy-to-use // parser for tag authors
{ "resource": "" }
c6670
train
// Returns the CURRENT token if the given type matches. // Consumes this token on success.
{ "resource": "" }
c6671
train
// Returns the CURRENT token if the given type AND value matches. // Consumes this token on success.
{ "resource": "" }
c6672
train
// Returns the CURRENT token if the given type AND value matches. // It DOES NOT consume the token.
{ "resource": "" }
c6673
train
// Error produces a nice error message and returns an error-object. // The 'token'-argument is optional. If provided, it will take // the token's position information. If not provided, it will // automatically use the CURRENT token's position information.
{ "resource": "" }
c6674
train
// Same as ExecuteWriter. The only difference between both functions is that // this function might already have written parts of the generated template in the // case of an execution error because there's no intermediate buffer involved for // performance reasons. This is handy if you need high performance template //...
{ "resource": "" }
c6675
train
// Executes the template and returns the rendered template as a string
{ "resource": "" }
c6676
train
// MustNewLocalFileSystemLoader creates a new LocalFilesystemLoader instance // and panics if there's any error during instantiation. The parameters // are the same like NewLocalFileSystemLoader.
{ "resource": "" }
c6677
train
// Get reads the path's content from your local filesystem.
{ "resource": "" }
c6678
train
// NewSandboxedFilesystemLoader creates a new sandboxed local file system instance.
{ "resource": "" }
c6679
train
// BanTag bans a specific tag for this template set. See more in the documentation for TemplateSet.
{ "resource": "" }
c6680
train
// BanFilter bans a specific filter for this template set. See more in the documentation for TemplateSet.
{ "resource": "" }
c6681
train
// CleanCache cleans the template cache. If filenames is not empty, // it will remove the template caches of those filenames. // Or it will empty the whole template cache. It is thread-safe.
{ "resource": "" }
c6682
train
// FromString loads a template from string and returns a Template instance.
{ "resource": "" }
c6683
train
// FromBytes loads a template from bytes and returns a Template instance.
{ "resource": "" }
c6684
train
// FromFile loads a template from a filename and returns a Template instance.
{ "resource": "" }
c6685
train
// RenderTemplateString is a shortcut and renders a template string directly.
{ "resource": "" }
c6686
train
// RenderTemplateBytes is a shortcut and renders template bytes directly.
{ "resource": "" }
c6687
train
// RenderTemplateFile is a shortcut and renders a template file directly.
{ "resource": "" }
c6688
train
// AsSafeValue works like AsValue, but does not apply the 'escape' filter.
{ "resource": "" }
c6689
train
// IsFloat checks whether the underlying value is a float
{ "resource": "" }
c6690
train
// IsInteger checks whether the underlying value is an integer
{ "resource": "" }
c6691
train
// Len returns the length for an array, chan, map, slice or string. // Otherwise it will return 0.
{ "resource": "" }
c6692
train
// Index gets the i-th item of an array, slice or string. Otherwise // it will return NIL.
{ "resource": "" }
c6693
train
// Interface gives you access to the underlying value.
{ "resource": "" }
c6694
train
// EqualValueTo checks whether two values are containing the same value or object.
{ "resource": "" }
c6695
train
// MustApplyFilter behaves like ApplyFilter, but panics on an error.
{ "resource": "" }
c6696
train
// NewMockCollectorReader creates a new mock instance // nolint
{ "resource": "" }
c6697
train
// GetAllRecords indicates an expected call of GetAllRecords // nolint
{ "resource": "" }
c6698
train
// GetUserRecords mocks base method // nolint
{ "resource": "" }
c6699
train
// NewMockCollector creates a new mock instance // nolint
{ "resource": "" }