Rename namespaces to match file locations

--HG--
branch : dev
This commit is contained in:
Renaud Paquay
2010-11-28 11:01:34 -08:00
parent 517725b5ce
commit 14dd1c754f
21 changed files with 35 additions and 41 deletions

View File

@@ -3,7 +3,7 @@ using System.Collections.Generic;
using System.Diagnostics; using System.Diagnostics;
using System.Linq; using System.Linq;
using NUnit.Framework; using NUnit.Framework;
using Orchard.Widgets.SimpleScripting.Compiler; using Orchard.Scripting.Compiler;
namespace Orchard.Tests.Modules.Scripting { namespace Orchard.Tests.Modules.Scripting {
[TestFixture] [TestFixture]

View File

@@ -1,9 +1,8 @@
using System; using System;
using System.Diagnostics; using System.Diagnostics;
using NUnit.Framework; using NUnit.Framework;
using Orchard.Scripting.SimpleScripting.Ast; using Orchard.Scripting.Ast;
using Orchard.Widgets.SimpleScripting.Ast; using Orchard.Scripting.Compiler;
using Orchard.Widgets.SimpleScripting.Compiler;
namespace Orchard.Tests.Modules.Scripting { namespace Orchard.Tests.Modules.Scripting {
[TestFixture] [TestFixture]

View File

@@ -1,8 +1,8 @@
using System.Linq; using System.Linq;
using NUnit.Framework; using NUnit.Framework;
using Orchard.Scripting;
using Orchard.Tests.Stubs; using Orchard.Tests.Stubs;
using Orchard.Widgets.Services; using Orchard.Widgets.Services;
using Orchard.Widgets.SimpleScripting;
namespace Orchard.Tests.Modules.Scripting { namespace Orchard.Tests.Modules.Scripting {
[TestFixture] [TestFixture]

View File

@@ -1,5 +1,5 @@
using NUnit.Framework; using NUnit.Framework;
using Orchard.Widgets.SimpleScripting.Compiler; using Orchard.Scripting.Compiler;
namespace Orchard.Tests.Modules.Scripting { namespace Orchard.Tests.Modules.Scripting {
[TestFixture] [TestFixture]

View File

@@ -1,7 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
using Orchard.Widgets.SimpleScripting.Ast;
namespace Orchard.Scripting.SimpleScripting.Ast { namespace Orchard.Scripting.Ast {
public class AbstractSyntaxTree { public class AbstractSyntaxTree {
public AstNode Root { get; set; } public AstNode Root { get; set; }

View File

@@ -2,7 +2,7 @@
using System.Linq; using System.Linq;
using System.Text; using System.Text;
namespace Orchard.Widgets.SimpleScripting.Ast { namespace Orchard.Scripting.Ast {
public abstract class AstNode { public abstract class AstNode {
public virtual IEnumerable<AstNode> Children { public virtual IEnumerable<AstNode> Children {
get { get {

View File

@@ -1,6 +1,6 @@
using System.Linq; using System.Linq;
namespace Orchard.Widgets.SimpleScripting.Ast { namespace Orchard.Scripting.Ast {
public class AstVisitor { public class AstVisitor {
public virtual object Visit(AstNode node) { public virtual object Visit(AstNode node) {
return node.Accept(this); return node.Accept(this);

View File

@@ -1,8 +1,7 @@
using System; using System.Collections.Generic;
using System.Collections.Generic; using Orchard.Scripting.Compiler;
using Orchard.Widgets.SimpleScripting.Compiler;
namespace Orchard.Widgets.SimpleScripting.Ast { namespace Orchard.Scripting.Ast {
public class BinaryAstNode : AstNode, IAstNodeWithToken { public class BinaryAstNode : AstNode, IAstNodeWithToken {
private readonly AstNode _left; private readonly AstNode _left;
private readonly Token _token; private readonly Token _token;

View File

@@ -1,6 +1,6 @@
using Orchard.Widgets.SimpleScripting.Compiler; using Orchard.Scripting.Compiler;
namespace Orchard.Widgets.SimpleScripting.Ast { namespace Orchard.Scripting.Ast {
public class ConstantAstNode : AstNode, IAstNodeWithToken { public class ConstantAstNode : AstNode, IAstNodeWithToken {
private readonly Token _token; private readonly Token _token;

View File

@@ -1,7 +1,7 @@
using System; using System;
using Orchard.Widgets.SimpleScripting.Compiler; using Orchard.Scripting.Compiler;
namespace Orchard.Widgets.SimpleScripting.Ast { namespace Orchard.Scripting.Ast {
public class ErrorAstNode : AstNode, IAstNodeWithToken { public class ErrorAstNode : AstNode, IAstNodeWithToken {
private readonly Token _token; private readonly Token _token;
private readonly string _message; private readonly string _message;

View File

@@ -1,6 +1,6 @@
using Orchard.Widgets.SimpleScripting.Compiler; using Orchard.Scripting.Compiler;
namespace Orchard.Widgets.SimpleScripting.Ast { namespace Orchard.Scripting.Ast {
public interface IAstNodeWithToken { public interface IAstNodeWithToken {
Token Token { get; } Token Token { get; }
} }

View File

@@ -1,7 +1,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using Orchard.Widgets.SimpleScripting.Compiler; using Orchard.Scripting.Compiler;
namespace Orchard.Widgets.SimpleScripting.Ast { namespace Orchard.Scripting.Ast {
public class MethodCallAstNode : AstNode, IAstNodeWithToken { public class MethodCallAstNode : AstNode, IAstNodeWithToken {
private readonly Token _token; private readonly Token _token;
private readonly IList<AstNode> _arguments; private readonly IList<AstNode> _arguments;

View File

@@ -1,7 +1,7 @@
using System.Collections.Generic; using System.Collections.Generic;
using Orchard.Widgets.SimpleScripting.Compiler; using Orchard.Scripting.Compiler;
namespace Orchard.Widgets.SimpleScripting.Ast { namespace Orchard.Scripting.Ast {
public class UnaryAstNode : AstNode, IAstNodeWithToken { public class UnaryAstNode : AstNode, IAstNodeWithToken {
private readonly AstNode _operand; private readonly AstNode _operand;
private readonly Token _token; private readonly Token _token;

View File

@@ -1,9 +1,8 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using Orchard.Scripting.SimpleScripting.Ast; using Orchard.Scripting.Ast;
using Orchard.Widgets.SimpleScripting.Ast;
namespace Orchard.Widgets.SimpleScripting.Compiler { namespace Orchard.Scripting.Compiler {
public class Interpreter { public class Interpreter {
public EvaluationResult Evalutate(EvaluationContext context) { public EvaluationResult Evalutate(EvaluationContext context) {
return new InterpreterVisitor(context).Evaluate(); return new InterpreterVisitor(context).Evaluate();

View File

@@ -1,8 +1,8 @@
using System; using System;
using System.Linq; using System.Linq;
using Orchard.Widgets.SimpleScripting.Ast; using Orchard.Scripting.Ast;
namespace Orchard.Widgets.SimpleScripting.Compiler { namespace Orchard.Scripting.Compiler {
public class InterpreterVisitor : AstVisitor { public class InterpreterVisitor : AstVisitor {
private readonly EvaluationContext _context; private readonly EvaluationContext _context;

View File

@@ -1,6 +1,6 @@
using System.Collections.Generic; using System.Collections.Generic;
namespace Orchard.Widgets.SimpleScripting.Compiler { namespace Orchard.Scripting.Compiler {
public class Lexer { public class Lexer {
private readonly Tokenizer _tokenizer; private readonly Tokenizer _tokenizer;
private readonly List<Token> _tokens= new List<Token>(); private readonly List<Token> _tokens= new List<Token>();

View File

@@ -1,9 +1,7 @@
using System; using System.Collections.Generic;
using System.Collections.Generic; using Orchard.Scripting.Ast;
using Orchard.Scripting.SimpleScripting.Ast;
using Orchard.Widgets.SimpleScripting.Ast;
namespace Orchard.Widgets.SimpleScripting.Compiler { namespace Orchard.Scripting.Compiler {
public class Parser { public class Parser {
private readonly string _expression; private readonly string _expression;
private readonly Lexer _lexer; private readonly Lexer _lexer;

View File

@@ -1,6 +1,6 @@
using System; using System;
namespace Orchard.Widgets.SimpleScripting.Compiler { namespace Orchard.Scripting.Compiler {
public class Token { public class Token {
public TokenKind Kind { get; set; } public TokenKind Kind { get; set; }
public int Position { get; set; } public int Position { get; set; }

View File

@@ -1,4 +1,4 @@
namespace Orchard.Widgets.SimpleScripting.Compiler { namespace Orchard.Scripting.Compiler {
public enum TokenKind { public enum TokenKind {
Eof, Eof,
OpenParen, OpenParen,

View File

@@ -1,7 +1,7 @@
using System; using System;
using System.Text; using System.Text;
namespace Orchard.Widgets.SimpleScripting.Compiler { namespace Orchard.Scripting.Compiler {
public class Tokenizer { public class Tokenizer {
private readonly string _expression; private readonly string _expression;
private readonly StringBuilder _stringBuilder; private readonly StringBuilder _stringBuilder;

View File

@@ -3,10 +3,10 @@ using System.Collections.Generic;
using System.Linq; using System.Linq;
using Orchard.Caching; using Orchard.Caching;
using Orchard.Localization; using Orchard.Localization;
using Orchard.Scripting.SimpleScripting.Ast; using Orchard.Scripting.Ast;
using Orchard.Widgets.SimpleScripting.Compiler; using Orchard.Scripting.Compiler;
namespace Orchard.Widgets.SimpleScripting { namespace Orchard.Scripting {
public class GlobalMethodContext { public class GlobalMethodContext {
public string FunctionName { get; set; } public string FunctionName { get; set; }
public IList<object> Arguments { get; set; } public IList<object> Arguments { get; set; }