Skip to content

Commit

Permalink
return type of readFile is IString
Browse files Browse the repository at this point in the history
  • Loading branch information
jurgenvinju committed Sep 15, 2017
1 parent c0473ad commit c83476d
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions src/org/rascalmpl/library/Prelude.java
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*******************************************************************************
* Copyright (c) 2009-2013 CWI
* Copyright (c) 2009-2017 CWI
* 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
Expand All @@ -15,6 +15,8 @@

package org.rascalmpl.library;

import static org.rascalmpl.values.uptr.RascalValueFactory.TYPE_STORE_SUPPLIER;

import java.io.BufferedReader;
import java.io.ByteArrayOutputStream;
import java.io.DataOutputStream;
Expand Down Expand Up @@ -79,6 +81,18 @@
import org.rascalmpl.uri.LogicalMapResolver;
import org.rascalmpl.uri.URIResolverRegistry;
import org.rascalmpl.uri.URIUtil;
import org.rascalmpl.values.uptr.ITree;
import org.rascalmpl.values.uptr.ProductionAdapter;
import org.rascalmpl.values.uptr.RascalValueFactory;
import org.rascalmpl.values.uptr.SymbolAdapter;
import org.rascalmpl.values.uptr.TreeAdapter;
import org.rascalmpl.values.uptr.visitors.TreeVisitor;

import com.ibm.icu.text.SimpleDateFormat;
import com.ibm.icu.util.Calendar;
import com.ibm.icu.util.TimeZone;
import com.ibm.icu.util.ULocale;

import io.usethesource.vallang.IBool;
import io.usethesource.vallang.IConstructor;
import io.usethesource.vallang.IDateTime;
Expand All @@ -105,23 +119,9 @@
import io.usethesource.vallang.io.old.BinaryValueReader;
import io.usethesource.vallang.io.old.BinaryValueWriter;
import io.usethesource.vallang.random.RandomValueGenerator;
import io.usethesource.vallang.random.util.TypeParameterBinder;
import io.usethesource.vallang.type.Type;
import io.usethesource.vallang.type.TypeFactory;
import io.usethesource.vallang.type.TypeStore;
import org.rascalmpl.values.uptr.ITree;
import org.rascalmpl.values.uptr.ProductionAdapter;
import org.rascalmpl.values.uptr.RascalValueFactory;
import org.rascalmpl.values.uptr.SymbolAdapter;
import org.rascalmpl.values.uptr.TreeAdapter;
import org.rascalmpl.values.uptr.visitors.TreeVisitor;

import com.ibm.icu.text.SimpleDateFormat;
import com.ibm.icu.util.Calendar;
import com.ibm.icu.util.TimeZone;
import com.ibm.icu.util.ULocale;

import static org.rascalmpl.values.uptr.RascalValueFactory.TYPE_STORE_SUPPLIER;

@SuppressWarnings("deprecation")
public class Prelude {
Expand Down Expand Up @@ -1054,7 +1054,7 @@ public ISet charsets() {
return w.done();
}

public IValue readFile(ISourceLocation sloc){
public IString readFile(ISourceLocation sloc){
if(trackIO) System.err.println("readFile: " + sloc);
try (Reader reader = URIResolverRegistry.getInstance().getCharacterReader(sloc);){
return consumeInputStream(reader);
Expand Down

0 comments on commit c83476d

Please sign in to comment.