bundles/org.eclipse.orion.client.webtools/web/webtools/util.js
function(ast, offset) {
			var found = null;
			 CssVisitor.visit(ast, {
	            visitNode: function(node) {
					if(node.range[0] <= offset) {
						if (node.range[1] === -1 || node.range[1] >= offset) {
							found = node;
						} else {
							return Visitor.SKIP;
						}
					} else {
					    return Visitor.BREAK;
					}      
	            },
	            endVisitNode: function(node) {
	            }
	        });
	        return found;
		}
function(ast, offset) {
			var found = null;
			 CssVisitor.visit(ast, {
	            visitNode: function(node) {
					if(node.range[0] <= offset) {
						if (node.range[1] === -1 || node.range[1] >= offset) {
							found = node;
						} else {
							return Visitor.SKIP;
						}
					} else {
					    return Visitor.BREAK;
					}      
	            },
	            endVisitNode: function(node) {
	            }
	        });
	        return found;
		}
function ( ast , offset ) { var found = null ; CssVisitor . visit ( ast , { visitNode : function ( node ) { if ( node . range [ 0 ] <= offset ) { if ( node . range [ 1 ] === - 1 || node . range [ 1 ] >= offset ) { found = node ; } else { return Visitor . SKIP ; } } else { return Visitor . BREAK ; } } , endVisitNode : function ( node ) { } } ) ; return found ; }
Returns the ast node at the given offset or the parent node enclosing it for a CSS ast
@param {Object} ast The AST to inspect
@param {Number} offset The offset into the source
@returns {Object} The AST node at the given offset or null
@since 10.0
Returns the ast node at the given offset or the parent node enclosing it for a CSS ast