Skip to content

Commit

Permalink
fix #12 add scope for structs
Browse files Browse the repository at this point in the history
  • Loading branch information
ulex committed Jan 21, 2015
1 parent 12a42ff commit 0fbef71
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
2 changes: 2 additions & 0 deletions ZenSharp.Integration/CSharpExtendedScopeProvider.cs
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,8 @@ public IEnumerable<string> ProvideScopePoints(TemplateAcceptanceContext tacConte
yield return "InCSharpInterface";
if (treeNode.GetContainingNode<IClassDeclaration>() != null)
yield return "InCSharpClass";
if (treeNode.GetContainingNode<IStructDeclaration>() != null)
yield return "InCSharpStruct";
}
else
{
Expand Down
4 changes: 4 additions & 0 deletions ZenSharp.Integration/Templates.ltg
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,10 @@ scope "InCSharpInterface" {
methodBody ::= ";"
}

scope "InCSharpStruct" {
// start ::= ""
}

scope "InCSharpStatement" {
start ::=
| "if ("=ifr identifier " == null) return;"
Expand Down

0 comments on commit 0fbef71

Please sign in to comment.