Tabnine Logo
SExpressionQuotedStringType
Code IndexAdd Tabnine to your IDE (free)

How to use
SExpressionQuotedStringType
in
com.io7m.jsx

Best Java code snippets using com.io7m.jsx.SExpressionQuotedStringType (Showing top 16 results out of 315)

origin: com.io7m.jpra/io7m-jpra-compiler-core

/**
 * @param e The expression
 *
 * @return A parser exception
 *
 * @see JPRAParseErrorCode#EXPECTED_SYMBOL_OR_LIST_GOT_QUOTED_STRING
 */
public static JPRACompilerParseException expectedSymbolOrListGotQuotedString(
 final SExpressionQuotedStringType e)
{
 final StringBuilder mb = new StringBuilder(256);
 mb.append("  Expected: A list or a symbol");
 mb.append(System.lineSeparator());
 mb.append("  Got: A quoted string '");
 mb.append(e.getText());
 mb.append("'");
 final String m = NullCheck.notNull(mb.toString());
 return new JPRACompilerParseException(
  e.getLexicalInformation().map(ImmutableLexicalPosition::newFrom),
  JPRAParseErrorCode.EXPECTED_SYMBOL_OR_LIST_GOT_QUOTED_STRING,
  m);
}
origin: com.io7m.jpra/com.io7m.jpra.compiler.core

/**
 * @param e The expression
 *
 * @return A parser exception
 *
 * @see JPRAParseErrorCode#EXPECTED_LIST_GOT_QUOTED_STRING
 */
public static JPRACompilerParseException expectedListGotQuotedString(
 final SExpressionQuotedStringType e)
{
 final StringBuilder mb = new StringBuilder(256);
 mb.append("  Expected: A list");
 mb.append(System.lineSeparator());
 mb.append("  Got: A quoted string '");
 mb.append(e.text());
 mb.append("'");
 final String m = NullCheck.notNull(mb.toString(), "Message");
 return new JPRACompilerParseException(
  e.lexical().map(LexicalPosition::copyOf),
  JPRAParseErrorCode.EXPECTED_LIST_GOT_QUOTED_STRING,
  m);
}
origin: com.io7m.jsx/io7m-jsx-parser

@Override
public Integer quotedString(
 final SExpressionQuotedStringType qs)
 throws IOException
{
 w.print('"');
 w.print(qs.getText());
 w.print('"');
 return Integer.valueOf(0);
}
origin: com.io7m.jsx/com.io7m.jsx.parser

@Override
public Integer quotedString(
 final SExpressionQuotedStringType qs)
 throws IOException
{
 w.print('"');
 w.print(qs.text());
 w.print('"');
 return Integer.valueOf(0);
}
origin: com.io7m.jsx/com.io7m.jsx.combinators

@Override
public Validation<List<JSXValidationErrorType>, SExpressionSymbolType>
quotedString(final SExpressionQuotedStringType ex)
 throws UnreachableCodeException
{
 final StringBuilder sb = new StringBuilder(128);
 sb.append("Expected a symbol but got a quoted string.");
 sb.append(System.lineSeparator());
 sb.append("  Expected: A symbol");
 sb.append(System.lineSeparator());
 sb.append("  Received: A quoted string \"");
 sb.append(ex);
 sb.append("\"");
 sb.append(System.lineSeparator());
 return Validation.invalid(
  List.of(JSXValidationError.of(ex.lexical(), sb.toString())));
}
origin: com.io7m.jsx/io7m-jsx-prettyprint

@Override
public Unit quotedString(final SExpressionQuotedStringType e)
 throws IOException
{
 JSXPrettyPrinterMarkupStyle.this.layout.print(
  String.format("\"%s\"", e.getText()));
 return Unit.unit();
}
origin: com.io7m.jpra/com.io7m.jpra.compiler.core

getExpressionLexical(le),
size,
qe.text());
origin: com.io7m.jsx/com.io7m.jsx.combinators

@Override
public Validation<List<JSXValidationErrorType>, SExpressionListType>
quotedString(final SExpressionQuotedStringType ex)
 throws UnreachableCodeException
{
 final StringBuilder sb = new StringBuilder(128);
 sb.append("Expected a list but got a quoted string.");
 sb.append(System.lineSeparator());
 sb.append("  Expected: A list");
 sb.append(System.lineSeparator());
 sb.append("  Received: A quoted string \"");
 sb.append(ex);
 sb.append("\"");
 sb.append(System.lineSeparator());
 return Validation.invalid(List.of(
  JSXValidationError.of(ex.lexical(), sb.toString())));
}
origin: com.io7m.jpra/com.io7m.jpra.compiler.core

/**
 * @param e The expression
 *
 * @return A parser exception
 *
 * @see JPRAParseErrorCode#EXPECTED_SYMBOL_GOT_QUOTED_STRING
 */
public static JPRACompilerParseException expectedSymbolGotQuotedString(
 final SExpressionQuotedStringType e)
{
 final StringBuilder mb = new StringBuilder(256);
 mb.append("  Expected: A symbol");
 mb.append(System.lineSeparator());
 mb.append("  Got: A quoted string '");
 mb.append(e.text());
 mb.append("'");
 final String m = NullCheck.notNull(mb.toString(), "Message");
 return new JPRACompilerParseException(
  e.lexical().map(LexicalPosition::copyOf),
  JPRAParseErrorCode.EXPECTED_SYMBOL_GOT_QUOTED_STRING,
  m);
}
origin: com.io7m.jpra/io7m-jpra-compiler-core

/**
 * @param e The expression
 *
 * @return A parser exception
 *
 * @see JPRAParseErrorCode#EXPECTED_LIST_GOT_QUOTED_STRING
 */
public static JPRACompilerParseException expectedListGotQuotedString(
 final SExpressionQuotedStringType e)
{
 final StringBuilder mb = new StringBuilder(256);
 mb.append("  Expected: A list");
 mb.append(System.lineSeparator());
 mb.append("  Got: A quoted string '");
 mb.append(e.getText());
 mb.append("'");
 final String m = NullCheck.notNull(mb.toString());
 return new JPRACompilerParseException(
  e.getLexicalInformation().map(ImmutableLexicalPosition::newFrom),
  JPRAParseErrorCode.EXPECTED_LIST_GOT_QUOTED_STRING,
  m);
}
origin: com.io7m.jsx/io7m-jsx-prettyprint

@Override
public Unit quotedString(final SExpressionQuotedStringType e)
 throws IOException
{
 JSXPrettyPrinterCodeStyle.this.layout.print(
  String.format("\"%s\"", e.getText()));
 return Unit.unit();
}
origin: com.io7m.jpra/com.io7m.jpra.compiler.core

/**
 * @param e The expression
 *
 * @return A parser exception
 *
 * @see JPRAParseErrorCode#EXPECTED_SYMBOL_OR_LIST_GOT_QUOTED_STRING
 */
public static JPRACompilerParseException expectedSymbolOrListGotQuotedString(
 final SExpressionQuotedStringType e)
{
 final StringBuilder mb = new StringBuilder(256);
 mb.append("  Expected: A list or a symbol");
 mb.append(System.lineSeparator());
 mb.append("  Got: A quoted string '");
 mb.append(e.text());
 mb.append("'");
 final String m = NullCheck.notNull(mb.toString(), "Message");
 return new JPRACompilerParseException(
  e.lexical().map(LexicalPosition::copyOf),
  JPRAParseErrorCode.EXPECTED_SYMBOL_OR_LIST_GOT_QUOTED_STRING,
  m);
}
origin: com.io7m.jpra/io7m-jpra-compiler-core

/**
 * @param e The expression
 *
 * @return A parser exception
 *
 * @see JPRAParseErrorCode#EXPECTED_SYMBOL_GOT_QUOTED_STRING
 */
public static JPRACompilerParseException expectedSymbolGotQuotedString(
 final SExpressionQuotedStringType e)
{
 final StringBuilder mb = new StringBuilder(256);
 mb.append("  Expected: A symbol");
 mb.append(System.lineSeparator());
 mb.append("  Got: A quoted string '");
 mb.append(e.getText());
 mb.append("'");
 final String m = NullCheck.notNull(mb.toString());
 return new JPRACompilerParseException(
  e.getLexicalInformation().map(ImmutableLexicalPosition::newFrom),
  JPRAParseErrorCode.EXPECTED_SYMBOL_GOT_QUOTED_STRING,
  m);
}
origin: com.io7m.jpra/io7m-jpra-compiler-core

JPRAParser.getExpressionLexical(le),
size,
qe.getText());
origin: com.io7m.jsx/com.io7m.jsx.combinators

 if (Objects.equals(name, s.text())) {
  return Validation.valid(s);
 sb.append(name);
 sb.append("\" but received a quoted string \"");
 sb.append(s.text());
 sb.append("\"");
 sb.append(System.lineSeparator());
 sb.append(s.text());
 sb.append("\"");
 sb.append(System.lineSeparator());
  JSXValidationError.of(s.lexical(), sb.toString())));
});
origin: com.io7m.jsx/com.io7m.jsx.combinators

 if (!texts.filter(text -> Objects.equals(s.text(), text)).isEmpty()) {
  return Validation.valid(s);
 sb.append(options);
 sb.append(" but received a quoted string \"");
 sb.append(s.text());
 sb.append("\"");
 sb.append(System.lineSeparator());
 sb.append(s.text());
 sb.append("'");
 sb.append(System.lineSeparator());
  JSXValidationError.of(s.lexical(), sb.toString())));
});
com.io7m.jsxSExpressionQuotedStringType

Javadoc

The type of quoted strings.

Most used methods

  • getText
  • text
  • lexical
  • getLexicalInformation

Popular in Java

  • Reading from database using SQL prepared statement
  • setRequestProperty (URLConnection)
  • setScale (BigDecimal)
  • requestLocationUpdates (LocationManager)
  • Menu (java.awt)
  • SocketException (java.net)
    This SocketException may be thrown during socket creation or setting options, and is the superclass
  • AtomicInteger (java.util.concurrent.atomic)
    An int value that may be updated atomically. See the java.util.concurrent.atomic package specificati
  • ZipFile (java.util.zip)
    This class provides random read access to a zip file. You pay more to read the zip file's central di
  • ServletException (javax.servlet)
    Defines a general exception a servlet can throw when it encounters difficulty.
  • SAXParseException (org.xml.sax)
    Encapsulate an XML parse error or warning.> This module, both source code and documentation, is in t
  • Top 17 Free Sublime Text Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now