function defineEnvironment(names, props, handler) {
	    if (typeof names === "string") {
	        names = [names];
	    }
	    if (typeof props === "number") {
	        props = { numArgs: props };
	    }
	    // Set default values of environments
	    var data = {
	        numArgs: props.numArgs || 0,
	        argTypes: props.argTypes,
	        greediness: 1,
	        allowedInText: !!props.allowedInText,
	        numOptionalArgs: props.numOptionalArgs || 0,
	        handler: handler,
	    };
	    for (var i = 0; i < names.length; ++i) {
	        module.exports[names[i]] = data;
	    }
	}
This function lexes a single token starting at `pos` and of the given mode.
Based on the mode, we defer to one of the `_innerLex` functions.