Search Options

Results per page
Sort
Preferred Languages
Advance

Results 51 - 60 of 663 for unquote (0.13 sec)

  1. src/fmt/scan.go

    func (s *ss) quotedString() string {
    	s.notEOF()
    	quote := s.getRune()
    	switch quote {
    	case '`':
    		// Back-quoted: Anything goes until EOF or back quote.
    		for {
    			r := s.mustReadRune()
    			if r == quote {
    				break
    			}
    			s.buf.writeRune(r)
    		}
    		return string(s.buf)
    	case '"':
    		// Double-quoted: Include the quotes and let strconv.Unquote do the backslash escapes.
    		s.buf.writeByte('"')
    		for {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Apr 02 21:56:20 UTC 2024
    - 31.9K bytes
    - Viewed (0)
  2. src/cmd/asm/internal/asm/parse.go

    			p.expectOperandEnd()
    			return
    		}
    		if p.have(scanner.String) {
    			if prefix != '$' {
    				p.errorf("string constant must be an immediate")
    				return
    			}
    			str, err := strconv.Unquote(p.get(scanner.String).String())
    			if err != nil {
    				p.errorf("string parse error: %s", err)
    			}
    			a.Type = obj.TYPE_SCONST
    			a.Val = str
    			// fmt.Printf("SCONST %s\n", obj.Dconv(&emptyProg, 0, a))
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Wed Feb 21 14:34:57 UTC 2024
    - 36.9K bytes
    - Viewed (0)
  3. src/cmd/vendor/golang.org/x/mod/modfile/read.go

    		return
    
    	case '"', '`': // quoted string
    		quote := c
    		in.readRune()
    		for {
    			if in.eof() {
    				in.pos = in.token.pos
    				in.Error("unexpected EOF in string")
    			}
    			if in.peekRune() == '\n' {
    				in.Error("unexpected newline in string")
    			}
    			c := in.readRune()
    			if c == quote {
    				break
    			}
    			if c == '\\' && quote != '`' {
    				if in.eof() {
    					in.pos = in.token.pos
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 03 02:38:00 UTC 2024
    - 23.1K bytes
    - Viewed (0)
  4. src/go/doc/example.go

    			if s.Path.ValuePos < start {
    				return groupStarts[i-1]
    			}
    		}
    		return groupStarts[len(groupStarts)-1]
    	}
    
    	for _, s := range file.Imports {
    		p, err := strconv.Unquote(s.Path.Value)
    		if err != nil {
    			continue
    		}
    		if p == "syscall/js" {
    			// We don't support examples that import syscall/js,
    			// because the package syscall/js is not available in the playground.
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 21.4K bytes
    - Viewed (0)
  5. src/cmd/go/internal/script/cmds.go

    			Detail: []string{
    				"The 'old' and 'new' arguments are unquoted as if in quoted Go strings.",
    			},
    		},
    		func(s *State, args ...string) (WaitFunc, error) {
    			if len(args)%2 != 1 {
    				return nil, ErrUsage
    			}
    
    			oldNew := make([]string, 0, len(args)-1)
    			for _, arg := range args[:len(args)-1] {
    				s, err := strconv.Unquote(`"` + arg + `"`)
    				if err != nil {
    					return nil, err
    				}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Tue Mar 26 19:58:28 UTC 2024
    - 28.5K bytes
    - Viewed (0)
  6. src/cmd/compile/internal/types2/resolver.go

    		n := names[r]
    		check.errorf(n, code, "missing init expr for %s", n.Value)
    	}
    }
    
    func validatedImportPath(path string) (string, error) {
    	s, err := strconv.Unquote(path)
    	if err != nil {
    		return "", err
    	}
    	if s == "" {
    		return "", fmt.Errorf("empty string")
    	}
    	const illegalChars = `!"#$%&'()*,:;<=>?[\]^{|}` + "`\uFFFD"
    	for _, r := range s {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Apr 18 14:10:44 UTC 2024
    - 26.3K bytes
    - Viewed (0)
  7. src/go/types/resolver.go

    		}
    	case l > r && (init != nil || r != 1):
    		n := s.Names[r]
    		check.errorf(n, code, "missing init expr for %s", n)
    	}
    }
    
    func validatedImportPath(path string) (string, error) {
    	s, err := strconv.Unquote(path)
    	if err != nil {
    		return "", err
    	}
    	if s == "" {
    		return "", fmt.Errorf("empty string")
    	}
    	const illegalChars = `!"#$%&'()*,:;<=>?[\]^{|}` + "`\uFFFD"
    	for _, r := range s {
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri May 17 16:22:59 UTC 2024
    - 26.1K bytes
    - Viewed (0)
  8. src/go/doc/reader.go

    		case *ast.GenDecl:
    			switch d.Tok {
    			case token.IMPORT:
    				// imports are handled individually
    				for _, spec := range d.Specs {
    					if s, ok := spec.(*ast.ImportSpec); ok {
    						if import_, err := strconv.Unquote(s.Path.Value); err == nil {
    							r.imports[import_] = 1
    							var name string
    							if s.Name != nil {
    								name = s.Name.Name
    								if name == "." {
    									r.hasDotImp = true
    								}
    							}
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu May 23 01:00:11 UTC 2024
    - 27.5K bytes
    - Viewed (0)
  9. src/go/internal/gccgoimporter/parser.go

    	lit := p.expect(scanner.Ident)
    	if lit != keyword {
    		p.errorf("expected keyword %s, got %q", keyword, lit)
    	}
    }
    
    func (p *parser) parseString() string {
    	str, err := strconv.Unquote(p.expect(scanner.String))
    	if err != nil {
    		p.error(err)
    	}
    	return str
    }
    
    // unquotedString     = { unquotedStringChar } .
    // unquotedStringChar = <neither a whitespace nor a ';' char> .
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Fri Feb 02 23:14:07 UTC 2024
    - 31.2K bytes
    - Viewed (0)
  10. src/go/constant/value.go

    		if n := len(lit); n >= 2 {
    			if code, _, _, err := strconv.UnquoteChar(lit[1:n-1], '\''); err == nil {
    				return MakeInt64(int64(code))
    			}
    		}
    
    	case token.STRING:
    		if s, err := strconv.Unquote(lit); err == nil {
    			return MakeString(s)
    		}
    
    	default:
    		panic(fmt.Sprintf("%v is not a valid token", tok))
    	}
    
    	return unknownVal{}
    }
    
    Registered: Wed Jun 12 16:32:35 UTC 2024
    - Last Modified: Thu Oct 19 12:02:03 UTC 2023
    - 34K bytes
    - Viewed (0)
Back to top