Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 4,516 for defn (0.06 sec)

  1. test/ken/rob2.go

    var tokenlen int = 0
    
    const EOF int = -1
    
    func main() {
    	var list *Slist
    
    	OpenFile()
    	for {
    		list = Parse()
    		if list == nil {
    			break
    		}
    		r := list.Print()
    		list.Free()
    		if r != "(defn foo (add 12 34))" {
    			panic(r)
    		}
    		break
    	}
    }
    
    func (slist *Slist) PrintOne(doparen bool) string {
    	if slist == nil {
    		return ""
    	}
    	var r string
    	if slist.isatom {
    		if slist.isstring {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 24 05:24:24 UTC 2012
    - 4.3K bytes
    - Viewed (0)
  2. src/html/template/multi_test.go

    	}
    	if _, err := t1.Parse(`{{define "test"}}foo{{end}}`); err != nil {
    		t.Fatalf("parsing test: %s", err)
    	}
    }
    
    func TestEmptyTemplate(t *testing.T) {
    	cases := []struct {
    		defn []string
    		in   string
    		want string
    	}{
    		{[]string{"x", "y"}, "", "y"},
    		{[]string{""}, "once", ""},
    		{[]string{"", ""}, "twice", ""},
    		{[]string{"{{.}}", "{{.}}"}, "twice", "twice"},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Sep 06 15:48:16 UTC 2022
    - 8K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/ssagen/nowb.go

    		return
    	}
    	fn := n.Fun.(*ir.Name)
    	if fn.Class != ir.PFUNC || fn.Defn == nil {
    		return
    	}
    	if types.RuntimeSymName(fn.Sym()) != "systemstack" {
    		return
    	}
    
    	var callee *ir.Func
    	arg := n.Args[0]
    	switch arg.Op() {
    	case ir.ONAME:
    		arg := arg.(*ir.Name)
    		callee = arg.Defn.(*ir.Func)
    	case ir.OCLOSURE:
    		arg := arg.(*ir.ClosureExpr)
    		callee = arg.Func
    	default:
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed May 15 17:29:46 UTC 2024
    - 5.9K bytes
    - Viewed (0)
  4. src/cmd/compile/internal/typecheck/dcl.go

    // Target.Funcs.
    //
    // Before returning, it sets CurFunc to fn. When the caller is done
    // constructing fn, it must call FinishFuncBody to restore CurFunc.
    func DeclFunc(fn *ir.Func) {
    	fn.DeclareParams(true)
    	fn.Nname.Defn = fn
    	Target.Funcs = append(Target.Funcs, fn)
    
    	funcStack = append(funcStack, ir.CurFunc)
    	ir.CurFunc = fn
    }
    
    // FinishFuncBody restores ir.CurFunc to its state before the last
    // call to DeclFunc.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 14 13:15:50 UTC 2023
    - 3.1K bytes
    - Viewed (0)
  5. src/text/template/multi_test.go

    	}
    	if _, err := t1.Parse(`{{define "test"}}foo{{end}}`); err != nil {
    		t.Fatalf("parsing test: %s", err)
    	}
    }
    
    func TestEmptyTemplate(t *testing.T) {
    	cases := []struct {
    		defn []string
    		in   string
    		want string
    	}{
    		{[]string{"x", "y"}, "", "y"},
    		{[]string{""}, "once", ""},
    		{[]string{"", ""}, "twice", ""},
    		{[]string{"{{.}}", "{{.}}"}, "twice", "twice"},
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Sep 08 10:48:29 UTC 2022
    - 11.7K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/ir/fmt.go

    		fmt.Fprintf(w, " p(%p)", n)
    	}
    
    	if base.Debug.DumpPtrs != 0 && n.Name() != nil && n.Name().Defn != nil {
    		// Useful to see where Defn is set and what node it points to
    		fmt.Fprintf(w, " defn(%p)", n.Name().Defn)
    	}
    
    	if base.Debug.DumpPtrs != 0 && n.Name() != nil && n.Name().Curfn != nil {
    		// Useful to see where Defn is set and what node it points to
    		fmt.Fprintf(w, " curfn(%p)", n.Name().Curfn)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 05 15:20:28 UTC 2023
    - 26K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/staticinit/sched.go

    		return true
    	}
    	if rn.Class != ir.PEXTERN || rn.Sym().Pkg != types.LocalPkg {
    		return false
    	}
    	if rn.Defn == nil {
    		// No explicit initialization value. Probably zeroed but perhaps
    		// supplied externally and of unknown value.
    		return false
    	}
    	if rn.Defn.Op() != ir.OAS {
    		return false
    	}
    	if rn.Type().IsString() { // perhaps overwritten by cmd/link -X (#34675)
    		return false
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 17:16:14 UTC 2024
    - 30.7K bytes
    - Viewed (0)
  8. src/debug/dwarf/type_test.go

    			typ, err := d.Type(e.Offset)
    			if err != nil {
    				t.Fatal("d.Type:", err)
    			}
    			t1 := typ.(*TypedefType)
    			var typstr string
    			if ts, ok := t1.Type.(*StructType); ok {
    				typstr = ts.Defn()
    			} else {
    				typstr = t1.Type.String()
    			}
    
    			if want, ok := testcases[t1.Name]; ok {
    				if seen[t1.Name] {
    					t.Errorf("multiple definitions for %s", t1.Name)
    				}
    				seen[t1.Name] = true
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 19 15:49:05 UTC 2022
    - 8.8K bytes
    - Viewed (0)
  9. src/cmd/compile/internal/typecheck/stmt.go

    }
    
    // select
    func tcSelect(sel *ir.SelectStmt) {
    	var def *ir.CommClause
    	lno := ir.SetPos(sel)
    	Stmts(sel.Init())
    	for _, ncase := range sel.Cases {
    		if ncase.Comm == nil {
    			// default
    			if def != nil {
    				base.ErrorfAt(ncase.Pos(), errors.DuplicateDefault, "multiple defaults in select (first at %v)", ir.Line(def))
    			} else {
    				def = ncase
    			}
    		} else {
    			n := Stmt(ncase.Comm)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Nov 20 15:10:54 UTC 2023
    - 17.8K bytes
    - Viewed (0)
  10. src/debug/dwarf/type.go

    }
    
    func (t *StructType) String() string {
    	if t.StructName != "" {
    		return t.Kind + " " + t.StructName
    	}
    	return t.Defn()
    }
    
    func (f *StructField) bitOffset() int64 {
    	if f.BitOffset != 0 {
    		return f.BitOffset
    	}
    	return f.DataBitOffset
    }
    
    func (t *StructType) Defn() string {
    	s := t.Kind
    	if t.StructName != "" {
    		s += " " + t.StructName
    	}
    	if t.Incomplete {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Oct 18 19:33:30 UTC 2023
    - 21.9K bytes
    - Viewed (0)
Back to top