# Path: ayrton/parser/astcompiler/consts.py
# CO_OPTIMIZED = 0x0001
# CO_NEWLOCALS = 0x0002
# CO_VARARGS = 0x0004
# CO_VARKEYWORDS = 0x0008
# CO_NESTED = 0x0010
# CO_GENERATOR = 0x0020
# CO_NOFREE = 0x0040
# CO_COROUTINE = 0x0080
# CO_ITERABLE_COROUTINE = 0x0100    # set by @types.coroutine
# CO_GENERATOR_ALLOWED = 0x1000
# CO_FUTURE_DIVISION = 0x2000
# CO_FUTURE_ABSOLUTE_IMPORT = 0x4000
# CO_FUTURE_WITH_STATEMENT = 0x8000
# CO_FUTURE_PRINT_FUNCTION = 0x10000
# CO_FUTURE_UNICODE_LITERALS = 0x20000
# CO_FUTURE_BARRY_AS_BDFL = 0x40000
# CO_FUTURE_GENERATOR_STOP = 0x80000
# CO_KILL_DOCSTRING = 0x100000
# CO_YIELD_INSIDE_TRY = 0x200000
# FVC_MASK      = 0x3
# FVC_NONE      = 0x0
# FVC_STR       = 0x1
# FVC_REPR      = 0x2
# FVC_ASCII     = 0x3
# FVS_MASK      = 0x4
# FVS_HAVE_SPEC = 0x4


from ayrton.parser.astcompiler import consts
from ayrton.parser.pyparser import parsestring
from ayrton.parser import error
    from ayrton.parser.pyparser import pyparse
    from ayrton.parser.astcompiler.astbuilder import ast_from_node
import ast

    new_node = node(w_string)
    new_node.lineno = atom_node.lineno
    new_node.col_offset = atom_node.col_offset
    joined_pieces.append(new_node)

def f_constant_string(astbuilder, joined_pieces, u, atom_node):
    add_constant_string(astbuilder, joined_pieces, u, atom_node)

def f_string_compile(astbuilder, source, atom_node):
    # Note: a f-string is kept as a single literal up to here.
    # At this point only, we recursively call the AST compiler
    # on all the '{expr}' parts.  The 'expr' part is not parsed
    # or even tokenized together with the rest of the source code!

    # complain if 'source' is only whitespace or an empty string
    for c in source:
        if c not in ' \t\n\r\v\f':
            break
    else:
        astbuilder.error("f-string: empty expression not allowed", atom_node)

    if astbuilder.recursive_parser is None:
        astbuilder.error("internal error: parser not available for parsing "
                   "the expressions inside the f-string", atom_node)
    assert isinstance(source, str)    # utf-8 encoded
    source = '(%s)' % source

    info = pyparse.CompileInfo("<fstring>", "eval",
                               consts.PyCF_SOURCE_IS_UTF8 |

# Path: ayrton/parser/astcompiler/consts.py
# CO_OPTIMIZED = 0x0001
# CO_NEWLOCALS = 0x0002
# CO_VARARGS = 0x0004
# CO_VARKEYWORDS = 0x0008
# CO_NESTED = 0x0010
# CO_GENERATOR = 0x0020
# CO_NOFREE = 0x0040
# CO_COROUTINE = 0x0080
# CO_ITERABLE_COROUTINE = 0x0100    # set by @types.coroutine
# CO_GENERATOR_ALLOWED = 0x1000
# CO_FUTURE_DIVISION = 0x2000
# CO_FUTURE_ABSOLUTE_IMPORT = 0x4000
# CO_FUTURE_WITH_STATEMENT = 0x8000
# CO_FUTURE_PRINT_FUNCTION = 0x10000
# CO_FUTURE_UNICODE_LITERALS = 0x20000
# CO_FUTURE_BARRY_AS_BDFL = 0x40000
# CO_FUTURE_GENERATOR_STOP = 0x80000
# CO_KILL_DOCSTRING = 0x100000
# CO_YIELD_INSIDE_TRY = 0x200000
# FVC_MASK      = 0x3
# FVC_NONE      = 0x0
# FVC_STR       = 0x1
# FVC_REPR      = 0x2
# FVC_ASCII     = 0x3
# FVS_MASK      = 0x4
# FVS_HAVE_SPEC = 0x4


# Path: ayrton/parser/astcompiler/fstring.py
from ayrton.parser.astcompiler import consts
from ayrton.parser.pyparser import parsestring
from ayrton.parser import error
    from ayrton.parser.pyparser import pyparse
    from ayrton.parser.astcompiler.astbuilder import ast_from_node
import ast


    new_node = node(w_string)
    new_node.lineno = atom_node.lineno
    new_node.col_offset = atom_node.col_offset
    joined_pieces.append(new_node)

def f_constant_string(astbuilder, joined_pieces, u, atom_node):
    add_constant_string(astbuilder, joined_pieces, u, atom_node)

def f_string_compile(astbuilder, source, atom_node):
    # Note: a f-string is kept as a single literal up to here.
    # At this point only, we recursively call the AST compiler
    # on all the '{expr}' parts.  The 'expr' part is not parsed
    # or even tokenized together with the rest of the source code!

    # complain if 'source' is only whitespace or an empty string
    for c in source:
        if c not in ' \t\n\r\v\f':
            break
    else:
        astbuilder.error("f-string: empty expression not allowed", atom_node)

    if astbuilder.recursive_parser is None:
        astbuilder.error("internal error: parser not available for parsing "
                   "the expressions inside the f-string", atom_node)
    assert isinstance(source, str)    # utf-8 encoded
    source = '(%s)' % source

    info = pyparse.CompileInfo("<fstring>", "eval",
                               consts.PyCF_SOURCE_IS_UTF8 |

                               consts.PyCF_IGNORE_COOKIE,