Package org.jruby.ast

Examples of org.jruby.ast.StrNode


            head = createDStrNode(head.getPosition()).add(head);
        }

        if (tail instanceof StrNode) {
            if (head instanceof StrNode) {
                StrNode front = (StrNode) head;
                // string_contents always makes an empty strnode...which is sometimes valid but
                // never if it ever is in literal_concat.
                if (front.getValue().getRealSize() > 0) {
                    return new StrNode(head.getPosition(), front, (StrNode) tail);
                } else {
                    return tail;
                }
            }
            head.setPosition(head.getPosition());
View Full Code Here


                    bufferEncoding != RubyYaccLexer.UTF8_ENCODING) {
                codeRange = ParserSupport.associateEncoding(buffer, RubyYaccLexer.ASCII8BIT_ENCODING, codeRange);
            }
        }

        return new StrNode(position, buffer, codeRange);
    }
View Full Code Here

            yaccValue = new FixnumNode(getPosition(), c);
        } else {
            // TODO: this isn't handling multibyte yet
            ByteList oneCharBL = new ByteList(1);
            oneCharBL.append(c);
            yaccValue = new StrNode(getPosition(), oneCharBL);
        }
        // TODO: This should be something else like a tCHAR
        return Tokens.tINTEGER;
    }
View Full Code Here

                    bufferEncoding != RubyLexer.UTF8_ENCODING) {
                codeRange = ParserSupport.associateEncoding(buffer, RubyLexer.ASCII8BIT_ENCODING, codeRange);
            }
        }

        return new StrNode(position, buffer, codeRange);
    }
View Full Code Here

                } else {
                    oneCharBL.append(c);
                }
               
                setState(LexState.EXPR_END);
                yaccValue = new StrNode(getPosition(), oneCharBL);
               
                return Tokens.tINTEGER; // FIXME: This should be something else like a tCHAR in 1.9/2.0
            } else {
                c = readEscape();
            }
        } else {
            newtok();
        }
       
        setState(LexState.EXPR_END);
        ByteList oneCharBL = new ByteList(1);
        oneCharBL.append(c);
        yaccValue = new StrNode(getPosition(), oneCharBL);
       
        return Tokens.tINTEGER;
    }
View Full Code Here

TOP

Related Classes of org.jruby.ast.StrNode

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.