You can not select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
					
					
						
							17 lines
						
					
					
						
							449 B
						
					
					
				
			
		
		
	
	
							17 lines
						
					
					
						
							449 B
						
					
					
				"use strict"; | 
						|
const parser = require("./generated-parser.js"); | 
						|
 | 
						|
exports.name = function (potentialName) { | 
						|
    return mapResult(parser.startWith("Name").exec(potentialName)); | 
						|
}; | 
						|
 | 
						|
exports.qname = function (potentialQname) { | 
						|
    return mapResult(parser.startWith("QName").exec(potentialQname)); | 
						|
}; | 
						|
 | 
						|
function mapResult(result) { | 
						|
    return { | 
						|
        success: result.success, | 
						|
        error: result.error && parser.getTrace(result.error.message) | 
						|
    }; | 
						|
}
 | 
						|
 |