diff options
author | 2010-07-15 23:50:30 +0000 | |
---|---|---|
committer | 2010-07-15 23:50:30 +0000 | |
commit | 13c9d58997d2d40657980b1c8a9bdc9fa99485e7 (patch) | |
tree | 21b412ae1a8dc24d2f74a5037bb716cb19c3b401 /Util/VS2010/Chalice/ChaliceLanguageService/Integration/Resolver.cs | |
parent | 2c516d5a900612ebcedfe0ad2c7fa3b2606063a1 (diff) |
Visual Studio 2010 integration for Dafny and Chalice. See the "How to install binaries" link from the boogie.codeplex.com home page.
Diffstat (limited to 'Util/VS2010/Chalice/ChaliceLanguageService/Integration/Resolver.cs')
-rw-r--r-- | Util/VS2010/Chalice/ChaliceLanguageService/Integration/Resolver.cs | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/Util/VS2010/Chalice/ChaliceLanguageService/Integration/Resolver.cs b/Util/VS2010/Chalice/ChaliceLanguageService/Integration/Resolver.cs new file mode 100644 index 00000000..9f6ddeba --- /dev/null +++ b/Util/VS2010/Chalice/ChaliceLanguageService/Integration/Resolver.cs @@ -0,0 +1,50 @@ +using System;
+using System.Collections.Generic;
+using System.Text;
+using Irony.Parsing;
+
+namespace Demo
+{
+ public class Resolver : Demo.IASTResolver
+ {
+ #region IASTResolver Members
+
+
+ public IList<Demo.Declaration> FindCompletions(object result, int line, int col)
+ {
+ // Used for intellisense.
+ List<Demo.Declaration> declarations = new List<Demo.Declaration>();
+
+ // Add keywords defined by grammar
+ foreach (KeyTerm key in Configuration.Grammar.KeyTerms.Values)
+ {
+ if(key.OptionIsSet(TermOptions.IsKeyword))
+ {
+ declarations.Add(new Declaration("", key.Name, 206, key.Name));
+ }
+ }
+
+ declarations.Sort();
+ return declarations;
+ }
+
+ public IList<Demo.Declaration> FindMembers(object result, int line, int col)
+ {
+ List<Demo.Declaration> members = new List<Demo.Declaration>();
+
+ return members;
+ }
+
+ public string FindQuickInfo(object result, int line, int col)
+ {
+ return "unknown";
+ }
+
+ public IList<Demo.Method> FindMethods(object result, int line, int col, string name)
+ {
+ return new List<Demo.Method>();
+ }
+
+ #endregion
+ }
+}
|