/*******************************************************************************
* Copyright (c) 2009 xored software, Inc.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* xored software, Inc. - initial API and Implementation (Alex Panchenko)
*******************************************************************************/
package org.eclipse.dltk.tcl.internal.structure.builders;
import org.eclipse.dltk.ast.Modifiers;
import org.eclipse.dltk.compiler.problem.ProblemSeverities;
import org.eclipse.dltk.tcl.ast.TclArgument;
import org.eclipse.dltk.tcl.ast.TclCommand;
import org.eclipse.dltk.tcl.structure.AbstractTclCommandModelBuilder;
import org.eclipse.dltk.tcl.structure.ITclModelBuildContext;
public class TclGlobalVariableModelBuilder extends
AbstractTclCommandModelBuilder {
public boolean process(TclCommand command, ITclModelBuildContext context) {
if (command.getArguments().isEmpty()) {
report(context, command,
"Syntax error: at least one argument expected.",
ProblemSeverities.Error);
return false;
}
for (TclArgument nameArg : command.getArguments()) {
processField(command, nameArg, null, Modifiers.AccGlobal, context);
}
return false;
}
}