Examples of FieldPattern


Examples of org.openquark.cal.compiler.SourceModel.FieldPattern

    public R visit_Expr_Case_Alt_UnpackRecord(UnpackRecord record, Object arg) {

        enterScope();
       
        for(int i = 0; i < record.getNFieldPatterns(); i++) {
            FieldPattern pattern = record.getNthFieldPattern(i);
           
            if(pattern.getPattern() != null &&
               pattern.getPattern() instanceof Pattern.Var) {
                Pattern.Var patternVar = (Pattern.Var)pattern.getPattern();
                addRegularBinding(patternVar.getName(), patternVar);

            } else if (pattern.getPattern() == null) {
                addRegularBinding(pattern.getFieldName().getName().getCalSourceForm(), pattern);
            }
        }
       
        if(record.getBaseRecordPattern() != null) {
            if(record.getBaseRecordPattern() instanceof Pattern.Var) {
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.