Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 10 of 10 for tweens (0.64 sec)

  1. src/cmd/compile/internal/syntax/scanner_test.go

    func TestSmoke(t *testing.T) {
    	const src = "if (+foo\t+=..123/***/0.9_0e-0i'a'`raw`\"string\"..f;//$"
    	tokens := []token{_If, _Lparen, _Operator, _Name, _AssignOp, _Dot, _Literal, _Literal, _Literal, _Literal, _Literal, _Dot, _Dot, _Name, _Semi, _EOF}
    
    	var got scanner
    	got.init(strings.NewReader(src), errh, 0)
    	for _, want := range tokens {
    		got.next()
    		if got.tok != want {
    			t.Errorf("%d:%d: got %s; want %s", got.line, got.col, got.tok, want)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Sep 14 16:11:21 UTC 2022
    - 21.9K bytes
    - Viewed (0)
  2. src/cmd/compile/internal/syntax/scanner.go

    // Go source. After initialization, consecutive calls of
    // next advance the scanner one token at a time.
    //
    // This file, source.go, tokens.go, and token_string.go are self-contained
    // (`go tool compile scanner.go source.go tokens.go token_string.go` compiles)
    // and thus could be made into their own package.
    
    package syntax
    
    import (
    	"fmt"
    	"io"
    	"unicode"
    	"unicode/utf8"
    )
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Mon Mar 28 18:17:41 UTC 2022
    - 17.1K bytes
    - Viewed (0)
  3. src/cmd/compile/internal/test/testdata/fp_test.go

    		expect64(t, "g", g, float64(int64(0x7fffffffffffffff)))
    		expect64(t, "h", h, float64(uint64(0xffffffffffffffff)))
    		expect64(t, "i", i, float64(float32(3.402823e38)))
    	}
    	{
    		// Check minimum values (and tweaks for unsigned)
    		a, b, c, d, e, f, g, h, i := conv2Float64_ssa(-128, 254, -32768, 65534, ^0x7fffffff, 0xfffffffe, ^0x7fffFFFFffffFFFF, 0xffffFFFFffffF401, 1.5e-45)
    		expect64(t, "a", a, -128)
    		expect64(t, "b", b, 254)
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 05 17:54:15 UTC 2022
    - 35K bytes
    - Viewed (0)
  4. src/cmd/asm/internal/asm/parse.go

    	}
    }
    
    // have reports whether the remaining tokens (including the current one) contain the specified token.
    func (p *Parser) have(token lex.ScanToken) bool {
    	for i := p.inputPos; i < len(p.input); i++ {
    		if p.input[i].ScanToken == token {
    			return true
    		}
    	}
    	return false
    }
    
    // at reports whether the next tokens are as requested.
    func (p *Parser) at(next ...lex.ScanToken) bool {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 21 14:34:57 UTC 2024
    - 36.9K bytes
    - Viewed (0)
  5. src/cmd/compile/internal/ssa/memcombine.go

    	// unaligned loads and unaligned stores.
    	if !f.Config.unalignedOK {
    		return
    	}
    
    	memcombineLoads(f)
    	memcombineStores(f)
    }
    
    func memcombineLoads(f *Func) {
    	// Find "OR trees" to start with.
    	mark := f.newSparseSet(f.NumValues())
    	defer f.retSparseSet(mark)
    	var order []*Value
    
    	// Mark all values that are the argument of an OR.
    	for _, b := range f.Blocks {
    		for _, v := range b.Values {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 21 19:45:41 UTC 2024
    - 18.4K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/rangefunc/rewrite.go

    //
    //	if #next op c { [#next = 0;] thens... }
    func (r *rewriter) ifNext(op syntax.Operator, c int, zeroNext bool, thens ...syntax.Stmt) syntax.Stmt {
    	var thenList []syntax.Stmt
    	if zeroNext {
    		clr := &syntax.AssignStmt{
    			Lhs: r.next(),
    			Rhs: r.intConst(0),
    		}
    		thenList = append(thenList, clr)
    	}
    	for _, then := range thens {
    		thenList = append(thenList, then)
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:05:44 UTC 2024
    - 41.6K bytes
    - Viewed (0)
  7. src/cmd/compile/internal/syntax/printer.go

    		_Break, _Continue, _Fallthrough, _Return,
    		/*_Inc, _Dec,*/ _Rparen, _Rbrack, _Rbrace: // TODO(gri) fix this
    		return true
    	}
    	return false
    }
    
    // TODO(gri) provide table of []byte values for all tokens to avoid repeated string conversion
    
    func lineComment(text string) bool {
    	return strings.HasPrefix(text, "//")
    }
    
    func (p *printer) addWhitespace(kind ctrlSymbol, text string) {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Aug 24 07:17:27 UTC 2023
    - 21.5K bytes
    - Viewed (0)
  8. src/cmd/compile/internal/syntax/parser_test.go

    		fmt.Printf("--- %s ---\n", filename)
    		fmt.Printf("%s\n", bytes1)
    		fmt.Println()
    
    		fmt.Printf("--- %s ---\n", filename)
    		fmt.Printf("%s\n", bytes2)
    		fmt.Println()
    
    		t.Error("printed syntax trees do not match")
    	}
    }
    
    func TestIssue17697(t *testing.T) {
    	_, err := Parse(nil, bytes.NewReader(nil), nil, nil, 0) // return with parser error, don't panic
    	if err == nil {
    		t.Errorf("no error reported")
    	}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Mar 14 16:30:19 UTC 2024
    - 12.2K bytes
    - Viewed (0)
  9. src/cmd/asm/internal/lex/input.go

    		return
    	}
    	actuals := in.argsFor(macro)
    	var tokens []Token
    	for _, tok := range macro.tokens {
    		if tok.ScanToken != scanner.Ident {
    			tokens = append(tokens, tok)
    			continue
    		}
    		substitution := actuals[tok.text]
    		if substitution == nil {
    			tokens = append(tokens, tok)
    			continue
    		}
    		tokens = append(tokens, substitution...)
    	}
    	in.Push(NewSlice(in.Base(), in.Line(), tokens))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Aug 29 07:48:38 UTC 2023
    - 12.6K bytes
    - Viewed (0)
  10. src/cmd/compile/internal/ssa/_gen/rulegen.go

    			last.Cond = &ast.BinaryExpr{
    				Op: token.LOR,
    				X:  last.Cond,
    				Y:  node.Cond,
    			}
    			return
    		}
    	}
    
    	w.List = append(w.List, node)
    }
    
    // predeclared contains globally known tokens that should not be redefined.
    var predeclared = map[string]bool{
    	"nil":   true,
    	"false": true,
    	"true":  true,
    }
    
    // declared reports if the body contains a Declare with the given name.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Sat Sep 02 22:09:21 UTC 2023
    - 48.7K bytes
    - Viewed (0)
Back to top