Make stardux data object on a
node if not already there.

@private
@param {Object} node
@param {Object} [data = {}]
@return {Object}
342900
function mkdux (node, data = {}) {
  if (node instanceof Container)
    node = node.domElement
  node[STARDUX_PRIVATE_ATTR] = ( node[STARDUX_PRIVATE_ATTR] || data )
  return node[STARDUX_PRIVATE_ATTR]
}
807994
def parse_data_display(self, node):
        

        if 'title' in node.lattrib:
            title = node.lattrib['title']
        else:
            self.raise_error('<DataDisplay> must have a title.')

        if 'dataregion' in node.lattrib:
            data_region = node.lattrib['dataregion']
        else:
            data_region = None

        self.current_simulation.add_data_display(DataDisplay(title, data_region))
813776
function getDelim() {
  const type = NodeType.DelimType;
  const token = tokens[pos];
  const line = token.ln;
  const column = token.col;
  const content = ',';

  pos++;

  return newNode(type, content, line, column);
}
137938
function(node) {
	var dp = DOMDataUtils.getDataParsoid(node);
	var dsr = Util.clone(dp.dsr);
	if (dp.autoInsertedStart) { dsr[2] = null; }
	if (dp.autoInsertedEnd) { dsr[3] = null; }
	return dsr;
}
375007
function addData(element, key, value) {
        if (value === undefined) {
            return element && element.h5s && element.h5s.data && element.h5s.data[key];
        }
        else {
            element.h5s = element.h5s || {};
            element.h5s.data = element.h5s.data || {};
            element.h5s.data[key] = value;
        }
    }
1048676
function parse(node) {
    const cfg = Object.assign({}, copyXmlAttributes(node));

    for (let i = 0, l = node.childNodes.length; i < l; ++i) {
        const el = node.childNodes.item(i);
        if (el.nodeType === ELEMENT_NODE) {
            if (!el.namespaceURI) {
                // attribute elements
                if (!cfg.attributes) cfg.attributes = {};
                cfg.attributes[el.localName] = el.childNodes.length ? parse(el) : copyXmlAttributes(el);
            } else if (el.namespaceURI === 'urn:flora:options') {
                // flora specific elements
                if (el.localName === 'dataSource') {
                    const dataSource = getDataSource(el);
                    if (!cfg.dataSources) cfg.dataSources = {};
                    if (cfg.dataSources[dataSource.name]) {
                        throw new Error(`Data source "${dataSource.name}" already defined`);
                    }
                    cfg.dataSources[dataSource.name] = dataSource.config;
                }
                if (el.localName === 'subFilter') {
                    if (!cfg.subFilters) cfg.subFilters = [];
                    cfg.subFilters.push(copyXmlAttributes(el));
                }
            }
        } else if (el.nodeType === TEXT_NODE && el.textContent.trim().length > 0) {
            throw new ImplementationError(`Config contains unnecessary text: "${el.textContent.trim()}"`);
        }
    }

    return cfg;
}
1192759
function getVariable() {
  const type = NodeType.VariableType;
  const token = tokens[pos];
  const line = token.ln;
  const column = token.col;
  const content = [];

  // Skip `$`.
  pos++;

  if (checkVariable(pos)) content.push(getVariable());
  else content.push(getIdent());

  return newNode(type, content, line, column);
}
715419
def dnode(self, node):
        """"""
        new_node = copy(node)
        new_node.lineno += self.dline
        new_node.col_offset += self.dcol
        return new_node
894445
def make_node(cls, id_, params, lineno):
        
        assert isinstance(params, SymbolARGLIST)
        entry = gl.SYMBOL_TABLE.access_func(id_, lineno)
        if entry is None:  # A syntax / semantic error
            return None

        if entry.callable is False:  # Is it NOT callable?
            if entry.type_ != Type.string:
                errmsg.syntax_error_not_array_nor_func(lineno, id_)
                return None

        gl.SYMBOL_TABLE.check_class(id_, CLASS.function, lineno)
        entry.accessed = True

        if entry.declared and not entry.forwarded:
            check_call_arguments(lineno, id_, params)
        else:  # All functions goes to global scope by default
            if not isinstance(entry, SymbolFUNCTION):
                entry = SymbolVAR.to_function(entry, lineno)
            gl.SYMBOL_TABLE.move_to_global_scope(id_)
            gl.FUNCTION_CALLS.append((id_, params, lineno,))

        return cls(entry, params, lineno)
257772
function setNodes(data){
        payload = data;

        if(kontx.args.deep === true){
            async.eachSeries(data, loadChild, sendNext);
        }
        else {
            sendNext();
        }
    }
470078
NodeData update(Function<NodeData, NodeData> update) {
    data = trie.nodes.update(index, update);
    return data;
  }
1086869
function processNode(node) {
            const openBrace = node.expressionStart
            const closeBrace = node.expressionEnd

            const interpolate = node.code

            const entity = interpolate.trim()
            if (!entity) {
                return
            }
            const firstCharIndex =
                openBrace.range[1] + interpolate.indexOf(entity)
            const lastCharIndex = firstCharIndex + entity.length

            const actualOpenSpaces = firstCharIndex - openBrace.range[1]
            const actualCloseSpaces = closeBrace.range[0] - lastCharIndex
            const expectedSpaces = options === "always" ? 1 : 0
            if (
                expectedSpaces !== actualOpenSpaces &&
                equalLine(openBrace.range[1], firstCharIndex)
            ) {
                context.report({
                    node: openBrace,
                    messageId: getMessageIdForTagOpen(
                        expectedSpaces,
                        actualOpenSpaces
                    ),
                    data: {
                        chars: openBrace.chars,
                        n: actualOpenSpaces,
                    },
                    fix(fixer) {
                        const range = [openBrace.range[1], firstCharIndex]
                        const text = " ".repeat(expectedSpaces)
                        return fixer.replaceTextRange(range, text)
                    },
                })
            }
            if (
                expectedSpaces !== actualCloseSpaces &&
                equalLine(lastCharIndex, closeBrace.range[0])
            ) {
                context.report({
                    node: closeBrace,
                    messageId: getMessageIdForTagClose(
                        expectedSpaces,
                        actualCloseSpaces
                    ),
                    data: {
                        chars: closeBrace.chars,
                        n: actualCloseSpaces,
                    },
                    fix(fixer) {
                        const range = [lastCharIndex, closeBrace.range[0]]
                        const text = " ".repeat(expectedSpaces)
                        return fixer.replaceTextRange(range, text)
                    },
                })
            }
        }
882194
function matchDatum(node, datum, ignored) {
    var subFilter;
    for (var i in datum) {
      if (ignored !== i && (subFilter = filters[i]) && !subFilter(node, datum[i])) {
        return false;
      }
    }
    return true;
  }
987938
def parse_run(self, node):
        

        if 'component' in node.lattrib:
            component = node.lattrib['component']
        else:
            self.raise_error('<Run> must specify a target component')

        if 'variable' in node.lattrib:
            variable = node.lattrib['variable']
        else:
            self.raise_error('<Run> must specify a state variable')

        if 'increment' in node.lattrib:
            increment = node.lattrib['increment']
        else:
            self.raise_error('<Run> must specify an increment for the ' +
                             'state variable')

        if 'total' in node.lattrib:
            total = node.lattrib['total']
        else:
            self.raise_error('<Run> must specify a final value for the ' +
                             'state variable')

        self.current_simulation.add_run(Run(component, variable, increment, total))
104024
function generateTableRowNode(line, separator) {

    const tableRow = {
        type: 'TableRow',
        children: separator.map(align => ({
            type: 'TableDataCell',
            align
        }))
    };

    for (let i = 0, data = calRow(line), len = data.length; i < len; i++) {
        tableRow.children[i].rawValue = data[i];
    }

    return tableRow;

}
502581
def data_object(data)
      data = data.keys.first if data.is_a?(Hash) && data.keys.size == 1
      data = @_object.__send__(data) if data.is_a?(Symbol) && defined?(@_object) && @_object && @_object.respond_to?(data)
      data
    end
793667
function nodeSBindUpdate(node, sBind, changes, updater) {
    if (sBind) {
        var len = changes.length;

        while (len--) {
            if (changeExprCompare(changes[len].expr, sBind.value, node.scope)) {
                var newBindData = evalExpr(sBind.value, node.scope, node.owner);
                var keys = unionKeys(newBindData, node._sbindData);

                for (var i = 0, l = keys.length; i < l; i++) {
                    var key = keys[i];
                    var value = newBindData[key];

                    if (value !== node._sbindData[key]) {
                        updater(key, value);
                    }
                }

                node._sbindData = newBindData;
                break;
            }

        }
    }
}