Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 2 of 2 for ExampleScope (0.24 sec)

  1. src/cmd/compile/internal/types2/example_test.go

    import (
    	"cmd/compile/internal/syntax"
    	"cmd/compile/internal/types2"
    	"fmt"
    	"log"
    	"regexp"
    	"sort"
    	"strings"
    )
    
    // ExampleScope prints the tree of Scopes of a package created from a
    // set of parsed files.
    func ExampleScope() {
    	// Parse the source files for a package.
    	var files []*syntax.File
    	for _, src := range []string{
    		`package main
    import "fmt"
    func main() {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Apr 28 17:58:07 UTC 2023
    - 7.1K bytes
    - Viewed (0)
  2. src/go/types/example_test.go

    import (
    	"fmt"
    	"go/ast"
    	"go/format"
    	"go/importer"
    	"go/parser"
    	"go/token"
    	"go/types"
    	"log"
    	"regexp"
    	"slices"
    	"strings"
    )
    
    // ExampleScope prints the tree of Scopes of a package created from a
    // set of parsed files.
    func ExampleScope() {
    	// Parse the source files for a package.
    	fset := token.NewFileSet()
    	var files []*ast.File
    	for _, src := range []string{
    		`package main
    import "fmt"
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 8.9K bytes
    - Viewed (0)
Back to top