             node_name = null
 
             # **task** definitions in Cakefiles
-            if @isCakefile and
+            if @config.isCakefile and
                     node instanceof Nodes.Call and
                     name_from_value(node.variable)?[0] is 'task' and
                     (arg = node.args[0]) instanceof Nodes.Value and

            @pos = 0
        upcomingInput: ->
            ''

# ## helper functions for the AST walker


# ## Parser
class Parser extends require('./parser').Parser
    constructor: (report_error) ->
        # Override to report and mark this parser failed.
        @parseError = (message, info) ->
            @failed = true
            # Remove 'error on line' as it is unneeded and incorrect.
            report_error info.line, message.replace(/.*on line \d.*:/, '')

        # Set .yy and wrap nodes so errors will be reported.
        @yy = Object.create Nodes
        for name, Node of Nodes when Node.prototype instanceof Nodes.Base
            @yy[name] = guard_node(Node, name, this, report_error)

    # Reset failed flag before parsing.
    parse: ->
        @failed = false
        return super

    # Add a `.yylloc` to lexer
    lexer:
