Welcome to mirror list, hosted at ThFree Co, Russian Federation.

BooLanguageBinding.boo « BooBinding « extras - github.com/mono/monodevelop.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 16470ea89f556693d5fd8f313646ec06d45a6b34 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#region license
// Copyright (c) 2005, Peter Johanson (latexer@gentoo.org)
// All rights reserved.
//
// BooBinding is free software; you can redistribute it and/or modify
// it under the terms of the GNU General Public License as published by
// the Free Software Foundation; either version 2 of the License, or
// (at your option) any later version.
// 
// BooBinding is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU General Public License for more details.
// 
// You should have received a copy of the GNU General Public License
// along with BooBinding; if not, write to the Free Software
// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
#endregion

namespace BooBinding

import System
import System.IO
import System.Diagnostics
import System.Collections
import System.Reflection
import System.Resources
import System.Xml
import System.CodeDom.Compiler;
import Boo.Lang.CodeDom;

import MonoDevelop.Projects
import MonoDevelop.Projects.Parser
import MonoDevelop.Projects.CodeGeneration
import MonoDevelop.Core.Gui
import MonoDevelop.Core

public class BooLanguageBinding(IDotNetLanguageBinding):
	internal static LanguageName = "Boo"
	compilerServices = BooBindingCompilerServices ()
	provider = BooCodeProvider ()
	parser = BooBinding.Parser.BooParser ()
	
	public Language as string:
		get:
			return LanguageName
	
	public def CanCompile(fileName as string) as bool:
		Debug.Assert(compilerServices is not null)
		return compilerServices.CanCompile(fileName)
	
	public def Compile (projectFiles as ProjectFileCollection , references as ProjectReferenceCollection , configuration as DotNetProjectConfiguration , monitor as IProgressMonitor ) as ICompilerResult:
		Debug.Assert(compilerServices is not null)
		return compilerServices.Compile (projectFiles, references, configuration, monitor)
	
	public def GenerateMakefile (project as Project, parentCombine as Combine) as void:
		// FIXME: dont abort for now
		// throw NotImplementedException ()
		return
	
	public def CreateCompilationParameters (projectOptions as XmlElement) as ICloneable:
		parameters = BooCompilerParameters ()
		return parameters
	
	public CommentTag as string:
		get:
			return "//"

	def IsSourceCodeFile (fileName as string):
		return Path.GetExtension(fileName).ToLower() == ".boo"

	public def GetCodeDomProvider () as CodeDomProvider:
		return provider
	
	public def GetSupportedClrVersions () as (ClrVersion):
		return array(ClrVersion, (ClrVersion.Net_2_0,))
	
	public def GetFileName (baseName as string) as string:
		return baseName + ".boo"
	
	public Parser as IParser:
		get:
			return parser
		
	public Refactorer as IRefactorer:
		get:
			return null