// Determine if a namespace name is valid. protected override bool IsValidNamespaceName(String name) { if(name == null) { return false; } JSScanner scanner = new JSScanner(name); if(scanner.FetchIdentifier() == null) { return false; } while(scanner.Peek() == '.') { scanner.Fetch(); if(scanner.FetchIdentifier() == null) { return false; } } return (scanner.Fetch() == -1); }
// Determine if an identifier is valid for this engine. public override bool IsValidIdentifier(String identifier) { if(identifier == null) { return false; } JSScanner scanner = new JSScanner(identifier); if(scanner.FetchIdentifier() == null) { return false; } return (scanner.Fetch() == -1); }